WorksheetsPractice Test Operator and Control Flow Statement 01
Total questions: 15
Worksheet time: 15mins
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
Which operator has the lowest priority?
++
%
+
||
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
++ and -- are unary operators.
True
False
Which of the following is not a Bitwise operator?
&
|
<<
&&
#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
Loops Means Repeat Statement One Time Only ?
True
False
A ________________ executes the sequence of statements many times until the stated condition becomes false.
data structures
control structures
loop
OOPS
A ______________ is a control flow statement that executes a block of code at least once.
do loop
do while loop
while loop
for loop
The meaning of the operator ______ is modulus in C language.
a. ++
b. mod
c. %
d. *
