Question #59924

Help please:
char c[] = "GATE2017";
char *p=c;
printf("\n%s", p + p[3] - p[1]);

Expert's answer

#include <stdio.h>
using namespace std;
int main(void) {
char c[] = "GATE2017";
char *p=c;
printf("\n%s", p + p[3] - p[1]);
return 0;
}


Answer:

The output will be:

2017

http://www.AssignmentExpert.com/</stdio.h>

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS