C | Advanced Pointer | Question 4

Last Updated :
Discuss
Comments
C
#include <stdio.h>

char *c[] = {"GeksQuiz", "MCQ", "TEST", "QUIZ"};
char **cp[] = {c+3, c+2, c+1, c};
char ***cpp = cp;

int main()
{
    printf("%s ", **++cpp);
    printf("%s ", *--*++cpp+3);
    printf("%s ", *cpp[-2]+3);
    printf("%s ", cpp[-1][-1]+1);
    return 0;
}
TEST sQuiz Z CQ
MCQ Quiz Z CQ
TEST Quiz Z CQ
GarbageValue sQuiz Z CQ
Tags:
Share your thoughts in the comments