Gate CS-2011 Question Paper With Solutions

Q. 22 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:

Gate CS-2011 Question Paper With Solutions

Learn More:   Gate EC-2010 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here