Open In App
Related Articles

GATE | GATE CS 2011 | Question 22

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report
What does the following fragment of C-program print?
char c[] = "GATE2011";
char *p =c;
printf("%s", p + p[3] - p[1]) ;

                    
(A) GATE2011 (B) E2011 (C) 2011 (D) 011

Answer: (C)

Explanation: SeeĀ https://www.geeksforgeeks.org/c-language-set-8/

Quiz of this Question

Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads