K
kelvSYC
What do you do in C so that you have two arrays that point to the same
values (ie. changing one array would also change the other)?
Can something like this work?
int a[];
int b[];
b = a
Or maybe this?
int a[];
int *b;
b = a;
In either case, would something like a[0] = 1 be the same as b[0] = 1
(and a[0] == b[0] would be true)?
values (ie. changing one array would also change the other)?
Can something like this work?
int a[];
int b[];
b = a
Or maybe this?
int a[];
int *b;
b = a;
In either case, would something like a[0] = 1 be the same as b[0] = 1
(and a[0] == b[0] would be true)?