This code works fine when b is incremented and a is printed upon increment
#include<stdio.h>
int main()
{
int a[] = {10,20,30,40,50}, *p, j;
int *b = a;
for(j=0;j<5;j++)
{
printf("%d\n",*b);
b++;
}
return 0;
}
What happens here? What effect does a++ have here to suggest lvalue
is required. Does a++ move to a point after all the elements of the array a?
#include<stdio.h>
int main()
{
int a[] = {10,20,30,40,50}, *p, j;
for(j=0;j<5;j++)
{
printf("%d\n",*a);
a++;
}
return 0;
}