Complicated Declarations - Programming

Q1:

What will be the output of the program?
#include<stdio.h>

int main()
{
    struct s1
    {
        char *z;
    int i;
    struct s1 *p;
    };
    static struct s1 a[] = {{'Nagpur', 1, a+1} , {'Chennai', 2, a+2} , 
                            {'Bangalore', 3, a} };

    struct s1 *ptr = a;
    printf('%s,', ++(ptr->z));
    printf(' %s,', a[(++ptr)->i].z);
    printf(' %s', a[--(ptr->p->i)].z);
    return 0;
}

A Nagpur, Chennai, Bangalore

B agpur, hennai, angalore

C agpur, Chennai, angalore

D agpur, Bangalore, Bangalore

ANS:A - Nagpur, Chennai, Bangalore

No answer description is available. Let's discuss.