C Operators Questions and Answers
Practice ModeShowing 10 of 122 questions
Q41
Find the output.
void main ( )
{
int a,b,c,d;
a=5; b=6; c=7;
d=a &=b&=c &&a;
printf("%d", d);
}
Answer: Option A
Q42
Find the output.
void main ( )
{
int a, b, c d;
a=5; b=6; c=7;
d=a &=b&=c &&a;
printf("%d",d);
Answer: Option A
Q43
Find the output.
void main ( )
{
float a=5,b=2;
int c;
c=a%b;
printf(%d", c);
}
Answer: Option C
Q44
Cast operator returns
Answer: Option B
Q45
Find the output
void main ( )
int i=10;
i=(10<10)? (10>=10)?
i=(10<10)? (10>=10)?
(10<=10)?1:2:3:4);
printf("%d",i);
}
Answer: Option D
Q46
Find the output.
void main( )
{
int a=b=2;
printf("%d %d", a++, ++b);
}
Answer: Option D
Q47
How to get a correct result for 2/3?
I. 2.0/3
II. (float)2/3
III. float(2/3)
Answer: Option C
Q48
Find the output.
void main ()
[
int x=5;
printf("%d", x*++x/--x);
}
Answer: Option C
Q49
Find the output
void main ( )
{
int a, b;
a=b=2;
a=a++ + ++b;
printf("%d", a++);
Answer: Option B
Q50
Find the output
void main ( )
{
int x=300*250/100;
printf("%d", x);
}
Answer: Option A