51 .
What is the output of the following code ?
#include<`stdio.h`> (Please neglect `` this signs)
void main()
{
int arr[2][3][2]={{{2,4},{7,8},{3,4},}, {{2,2},{2,3},{3,4}, }};
printf("
%d",**(*arr+1)+2+7);
}
A.7
B. 11
C. 16
D.25
E.Error
View AnswerAns: 16
53 .
What is the output of the following code ?
#include<`stdio.h`> (Please neglect `` this signs)
void main()
{
int arr[]={0,1,2,3,4,5,6};
int i,*ptr;
for(ptr=arr+4,i =0; i<=4; i++) printf("
%d",ptr[-i]);(as the 0=4,for -1 it becomes =3)
}
A.Error
B. 6 5 4 3 2
C. 4 3 2 1 0
D.0 garbage garbage garbage garbage
E.None of these
View AnswerAns: 4 3 2 1 0
54 .
What is the output of this program ?
struct num
{
int no;
char name[25];
};
void main()
{
struct num n1[]={{25,"rose"},{20,"gulmohar"}, {8,"geranium"},{11,"dahalia"}};
printf("%d%d" ,n1[2].no,(*&n1+2)->no+1);
}
A.8 8
B. 8 9
C. 9 8
D.8 , unpredictable
E.Error
View AnswerAns: 8 9