...
UGC NET CS 2008-june-Paper-2
November 13, 2024
Graphics
November 14, 2024
UGC NET CS 2008-june-Paper-2
November 13, 2024
Graphics
November 14, 2024

NTA UGC NET Dec 2023 Paper-2

Question 52
Consider the following 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.
(A) printf(“%d”, ptr[i]);
(B) printf (“%d”, ptr[i+1]);
(C) printf (“%d”, ptr[-i]);
(D) printf(“%d”, ptr[i+1]);
Choose the correct answer from the options given below:

A
(C), (A), (B), (D)

B
(C), (D), (A), (B)
C
(D), (A), (B), (C)
D
(A), (B), (D), ( C)
Correct Answer: B
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!