C Array Questions and Answers
Practice ModeShowing 10 of 108 questions
Q91
Find the output
void main ()
{
char *p;
char b[10]={1, 2, 3, 4, 5, 6, 7, 8};
p=(b+1) [5];
printf("%d",p);
}
Answer: Option B
Q92
Find the output
void main ( )
{
char s [ ]="041";
int x;
x=atoi (s) ;
printf("%d", x);
}
Answer: Option B
Q93
Find the output
void main ( )
{
int a[ ][3]={1,2,3,4, 0, 6};
orubtf(%d %d", *(*a+1));
}
Answer: Option A
Q94
Find the output
void main ( )
{
char a[5]="Good night";
printf("%s", a);
}
Answer: Option C
Q95
Find the output
void main ( )
{
int a[2] [2] [2] ={1, 2, 3, 4, 5, 6, 7, 8);
printff("%d", *(a[0]));
}
Answer: Option C
Q96
Find the output
void main ( )
{
int a[5];
int *p=&a[3];
p[-2]=5;
[[-1]=10;
p[-3]=15;
printf("%d", p[2]);
}
Answer: Option D
Q97
Find the output
void main ( )
{
char *s [ ]="rabi", "manoj", "bubu"};
printf("%s %s %s", *s, ++*s, *(s+2));
}
Answer: Option C
Q98
Find the output
int a[ ]={3, 7, 9, 11}, count;
call ( )
{
return ++count;
}
void main ( )
{
a[count++]=call ();
printf("%d", a[count]);
}
Answer: Option D
Q99
Find the output
void main ( )
{
char ch [ ]=?welcome";
omt o=0;
while (i<strlen (ch))
putchar (ch[i++] | 32);
}
Answer: Option A
Q100
Find the output.
void main()
{
int arr[5]= { }, i;
char *p;
for (i=0; i<5,i++)
arr [i]=i;
p=(char*) arr;
printf("%d %d", p, arr+1);
}
Answer: Option D