[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Pointers - Discussion

Home > C Programming > Pointers > MCQs Questions Discussion

13 / 60

What is the output of the following C Program?

#include<stdio.h>
void main( )
{
static int  a[]  = {0,1,2,3,4};
int  *p[ ] = {a,a+1,a+2,a+3,a+4};
int  **ptr =  p;
ptr++;
printf("\n %d  %d %d", ptr-p, *ptr-a, **ptr);
*ptr++;
printf("\n %d  %d %d", ptr-p, *ptr-a, **ptr);
*++ptr; 
printf("\n %d  %d %d", ptr-p, *ptr-a, **ptr);
++*ptr;
printf("\n %d  %d %d", ptr-p, *ptr-a, **ptr);
}

A1 1 1 2 2 2 3 3 3 4 4 4

B111 222 333 344

CCompilation Error

DNone of these

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!