Wednesday, March 23, 2016

a value in an array is passing to a function Example

                   value in an array is passing to a function Example
Same as the previous program but the simple difference which is Red colourly quoted pointer calling 

#include
#include

int array_test(int arra[]);
int main ()
{

     int line[5] = {10,20,30,40,50};
array_test(line );
return 0;
getch();
}

array_test(int arra1[])
{
int i;
printf("arra value is  ");
for(i=4; i>-1; i-- )
          printf(" _%d ",*arra1++);
return 0;
}

No comments:

Post a Comment