What values are be stored in 'a' after the above sample code
is run if it is run on a system where pointers are two bytes lo

Q

char a;
char ca[] = {'a','e','i','o','u','y'};
char* pca = ca;
pca += 2;
a = *pca;

What values are be stored in 'a' after the above sample code
is run if it is run on a system where pointers are two bytes long?
1) a = 'u'
2) a = 'e'
3) a = 'i'
4) The code is illegal. Only a pointer can be added to a pointer,
not an integer.
5) The value cannot be determined without also knowing the size of an int on the system.

✍: Guest

A
(This question has not been answered yet. If you know the answer, please share it in a comment below.)

2012-04-20, 2601👍, 0💬