[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 :: Arrays - Discussion

Home > C Programming > Arrays > MCQs Questions Discussion

23 / 55

What will be the output of the program ?

#include<stdio.h> 
void main()
{
static int a[3][3]={1,2,3,4,5,6,7,8,9};
int i,j;
static int *p[]={a,a+1,a+2};
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j),*(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i));
}
}

A1 1 1 1 2 4 2 4 3 7 3 7 4 2 4 2 5 5 5 5 6 8 6 8 7 3 7 3 8 6 8 6 9 9 9 9

B1 2 1 1 2 4 2 4 3 7 3 7 4 2 4 2 5 1 5 5 6 8 6 8 7 3 7 3 8 1 8 6 9 9 9 9

CCompilation error

DNone of these

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!