Computer Science · C Programming
Consider the following C code segment: int arr[ ] = {0, 1, 2, 3, 4}; int i = 1, ptr; ptr = arr + 2; Arrange the following printf statements in the increasing order of their output values: (A) printf('%d', ptr[i]); (B) printf('%d', ptr[i+1]); (C) printf('%d', ptr[-i]); (D) printf('%d', ptr[-i+1]);
- 1(A), (B), (D), (C)
- 2(D), (A), (B), (C)
- 3(C), (D), (A), (B)✓
- 4(C), (A), (B), (D)
Correct answer
(C), (D), (A), (B)
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on C Programming?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · C Programming