1.
What is
wrong with the following code:
Short a [32];
for( int i = 0; i < 32; i++)
*a++ = i*i;
2.
Determine
the value of each of the indicated variables after the following code executes.
Assume that each integer occupies 4 bytes and that m is stored in memory
starting at byte 0x3ffd00.
int m = 44;
int* p = &m;
int&
r = m;
int n = (*p) ++;
int* q = p – 1;
r = * (--p) + 1;
++*q;
a.
m
b.
n
c.
&m
d.
*p
e.
r
f.
*q
Ulasan ini telah dialihkan keluar oleh pengarang.
BalasPadamYe atikah tak faham yang mane?
PadamMaaf terpadam komen tu.
Soalan ni minta awak dapatkan nilai pembolehubah yang disenaraikan dari a - f.