← Quiz: C Pointers: all 10 questions
Quiz: C Pointers · Question 3 of 10
If p is an int pointer holding address 1000 (int = 4 bytes), what address is p + 2?
If p is an int pointer holding address 1000 (int = 4 bytes), what address is p + 2?
- A.1002
- B.1008
- C.1004
- D.2000
Answer & explanation
Correct answer: 1008
Each step moves sizeof(int) = 4 bytes: 1000 + 2 × 4 = 1008.
Can you get the rest right without peeking?
Take the timed Quiz: C Pointers quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →