1.

What will be the output of the program ?_x000D_ #include_x000D_ _x000D_ int main()_x000D_ {_x000D_ static int arr[] = {0, 1, 2, 3, 4};_x000D_ int *p[] = {arr, arr+1, arr+2, arr+3, arr+4};_x000D_ int **ptr=p;_x000D_ ptr++;_x000D_ printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr);_x000D_ *ptr++;_x000D_ printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr);_x000D_ *++ptr;_x000D_ printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr);_x000D_ ++*ptr;_x000D_ printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr);_x000D_ return 0;_x000D_ }

A. 0, 0, 01, 1, 12, 2, 23, 3, 3
B. 1, 1, 22, 2, 33, 3, 44, 4, 1
C. 1, 1, 12, 2, 23, 3, 33, 4, 4
D. 0, 1, 21, 2, 32, 3, 43, 4, 5
Answer» D. 0, 1, 21, 2, 32, 3, 43, 4, 5


Discussion

No Comment Found