Iclicker Question 2 Flashcards

1
Q

Char *a, b; // what is the type of a

A

Character pointer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Char *a, b; // what is the type of b

A

Char (not a pointer)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Short *ps = 0x304; // ps address is at 0x300.
ps[0] is what address?

A

0x304

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Short *ps = 0x304; // ps address is at 0x300.
ps[3] is at what address?

A

0x310

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Short *ps = 0x304; // ps address is at 0x300.
What is the value of the ps?

A

0x304

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Short *ps = 0x304; // ps address is at 0x300.
What is the value of ps+1?

A

0x306

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Short *ps = 0x304; // ps address is at 0x300.
What is the value of ps+3?

A

0x310

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly