- #1
MorrowUoN
- 9
- 0
What is the value of x after the following C code sequence?
Discuss the value of y.
int x = 0x1201, *y;
y = &x;
*y++ = 0x1000;
Analyse the following code and provide the values of the elements of the array x
after the code is executed.
int x[] = {1, 2, 3, 0, 5, 6, 0};
int *px = x;
do
{
*px += *x;
px++;
} while (*px != 0);
Any help is appreciated, thanks.
Discuss the value of y.
int x = 0x1201, *y;
y = &x;
*y++ = 0x1000;
Analyse the following code and provide the values of the elements of the array x
after the code is executed.
int x[] = {1, 2, 3, 0, 5, 6, 0};
int *px = x;
do
{
*px += *x;
px++;
} while (*px != 0);
Any help is appreciated, thanks.