Iclicker Question 2 Flashcards
1
Q
Char *a, b; // what is the type of a
A
Character pointer
2
Q
Char *a, b; // what is the type of b
A
Char (not a pointer)
3
Q
Short *ps = 0x304; // ps address is at 0x300.
ps[0] is what address?
A
0x304
4
Q
Short *ps = 0x304; // ps address is at 0x300.
ps[3] is at what address?
A
0x310
5
Q
Short *ps = 0x304; // ps address is at 0x300.
What is the value of the ps?
A
0x304
6
Q
Short *ps = 0x304; // ps address is at 0x300.
What is the value of ps+1?
A
0x306
7
Q
Short *ps = 0x304; // ps address is at 0x300.
What is the value of ps+3?
A
0x310
8
Q
Short *ps = 0x304; // ps address is at 0x300.
What address of memory is changed by this stmt: *(ps+3) = 0xdead;
A
ps[3] // since *(x+n) == x[n]