NEW
Font size
WorksheetsC classroom activity 8.4.25
Total questions: 20
Worksheet time: 9mins
int x;
int y;
int z;
x=3;
y=4;
z = ++x * y++;
printf("%d",z);
12
16
20
0
In C programming language, which of the following type of operators have the highest precedence
Relational operators
Equality operators
Logical operators
Arithmetic operators
Which of the following comments about the ++ operator are correct?
1) It is a unary operator
2) The operand can come before or after the operator
3)It associates from the right
1 and 3
1 and 2
2 and 3
1,2,3
int main()
{
int a = 25%10;
printf("%d", a);
return 0;
}
5
2
2.5
5.5
The modulus operator (%) can be used only with integers.
True
False
!= is the example of ____________________ operator.
Relational
Logical
Assignment
Conditional
Which of the following is not a Bitwise operator?
&
|
<<
&&
The _____________ operator checks if the value of left operand is greater than the value of right operand.
= =
<
>
=
#include <stdio.h>
int main()
{
int i = 95;
char c = 97;
printf("%d, %d\n", sizeof(i), sizeof(c));
return 0;
}
2,1
4,2
2,4
2,8
#include <stdio.h>
void main()
{
int x = 5 * 9 / 3 + 9;
}
24
3
23
4
1011 & 0111
1000
0011
1011
None of these
#include <stdio.h>
int main() {
int y = 2;
int z = y +(y = 10);
printf("%d\n", z);
}
12
20
Either 12 or 20
4
4<<2
16
8
16>>2
4
8
32
64
int x = 15;
(x>0)?printf("x is greater"):printf("x having negative values")
Find the Output.
Error
x is greater
x having negative values
None of these
int x = 15;
x=+5;
printf("x value is: %d",x);
Error
x value is: 20
x value is: 15
None of these
int x = 15, y=10;
if(x>20 && y<=10)
printf("Condition Satisfied");
else
printf("Condition not satisfied");
Error
Condition Satisfied
Condition not Satisfied
None of these
What is the other name for C Language ?: Question Mark Colon Operator.?
Comparison Operator
If-Else Operator
Binary Operator
Ternary Operator
Which of the following is not a compound assignment operator?
+=
/=
%=
==
#include <stdio.h>
void main()
{
int x = 5 * 9 / 3 + 9;
printf ("%d",x);
}
24
3
23
4
