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>

LATEST TUTORIALS
APPROVED BY CLIENTS