adplus-dvertising
frame-decoration

Question

What is the output of this program?
#include <stdio.h>
void main(){
char c[] = "GATE2011"; 
char *p =c; 
printf("%s", p + p[3] - p[1]);
}

a.

GATE2011

b.

E2011

c.

2011

d.

11

Posted under Strings C Programming

Answer: (c).2011

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?