A
asdfghjk
#include <stdio.h>
main()
{
struct Data
{
int a;
int b;
} y[4] = { 1, 10, 3, 30, 2, 20, 4, 40};
struct Data *x = y;
int i;
for(i=0; i<4; i++)
{
x->a = x->b, ++x++->b;
printf("%d %d\t", y.a, y.b);
}
}
I have confusion regarding the ++x++->b part.
The output is : 10 11 30 31 20 21 40 41
main()
{
struct Data
{
int a;
int b;
} y[4] = { 1, 10, 3, 30, 2, 20, 4, 40};
struct Data *x = y;
int i;
for(i=0; i<4; i++)
{
x->a = x->b, ++x++->b;
printf("%d %d\t", y.a, y.b);
}
}
I have confusion regarding the ++x++->b part.
The output is : 10 11 30 31 20 21 40 41