C Operators Questions and Answers
Practice ModeShowing 10 of 122 questions
Q91
Find the output
void main ( )
{
int i=48, j=50;
printf(i>j?"%d':"%c", i, j);
}
Answer: Option C
Q92
Which of the following operators have left to right associativity?
Answer: Option C
Q93
Find the output
void main ( )
{
int a=-5;
a>>=2;
a<<=2;
printf("%d",a);
}
Answer: Option C
Q94
Find the output if the values entered by the user are:100 200 300
void main ( )
{
int a=1, b=2, c=3;
scanf("%d %*d %d", &a, &b, &c);
printf("a+%d b=%d c=%d', a, b, c);
}
Answer: Option D
Q95
Find the output
void main ( )
{
int a[10]={'a', 1, 'b', 2, 'c', 3}, i=2;
i<<2;
for (i:i<6:i++)
{
if (a[i]>=97&&a[i]<=122)
printf("%d", a[i]);
}
}
Answer: Option D
Q96
Find the output if the values entered by the user are 123456 44 544
void main ( )
[
int a,b,c;
scanf("%1d %2d %3d", &a, &b, &c);
printf("Sum=%d", ab+c);
}
Answer: Option A
Q97
Find the output
void main ( )
{
int i=5;
i=++i + ++i + i++;
printf("%d', i);
}
Answer: Option B
Q98
Find the output
void main ( )
{
int i=5;
i=++i + +i + i++;
i=++i + ++i + i++;
printf("%d", i);
}
Answer: Option B
Q99
Find the output
void main ( )
{
int i=5;
i=--i+i--;
printf("5d", i);
}
Answer: Option C
Q100
Find theoutput
void main ( )
{
int a=1, b=2, c=3, d=4;
printf("%d %d %d", a++, b-+c, d=a-b);
}
Answer: Option C