1.

What will be the output of the program?_x000D_ #include_x000D_ _x000D_ int main()_x000D_ {_x000D_ struct s1_x000D_ {_x000D_ char *z;_x000D_ int i;_x000D_ struct s1 *p;_x000D_ };_x000D_ static struct s1 a[] = {{"Nagpur", 1, a+1} , {"Chennai", 2, a+2} , _x000D_ {"Bangalore", 3, a} };_x000D_ _x000D_ struct s1 *ptr = a;_x000D_ printf("%s,", ++(ptr->z));_x000D_ printf(" %s,", a[(++ptr)->i].z);_x000D_ printf(" %s", a[--(ptr->p->i)].z);_x000D_ return 0;_x000D_ }

A. Nagpur, Chennai, Bangalore
B. agpur, hennai, angalore
C. agpur, Chennai, angalore
D. agpur, Bangalore, Bangalore
Answer» E.


Discussion

No Comment Found

Related MCQs