void fun(int *i);
void main( )
{
int gyan[] = { 10, 20, 30, 40, 50 };
int i, *ptr ;
ptr = gyan;
for ( i = 0 ; i <4 ; i++ )
{
fun(ptr++);
printf ( “\n%d”, *ptr ) ;
}
}
void fun(int *i)
{
*i = *i + 1;
}
Output is : 20 30 40 50
y not 11 21 31 41 since the array's reference is sent...but the modifications doesnt fall into the gyan[]..y???

Last edited by IndiraP; 19Nov2012 at 11:00..