WorksheetsDay 2 C Programming quiz
Total questions: 10
Worksheet time: 5mins
Operator % in C Language is called.?
Percentage Operator
Modulo Operator
Division Operator
Quotient Operator
int b = 5 + 4.867;
b is ........
b = 5
b = 9.867
b = 9
compiler error.
int main()
{
int a=0;
a = 4 + 5/2*10 + 5;
printf("%d", a);
return 0;
}
The output of the above code is,
29
None of these
5
34
Choose a a valid type of variable name
sum
sum$value
float
piece flag
Operators used in C programming language
Arithmetic Operators
Logical Operators
Conditional Operator
All the above
A local variable is stored in ___
Stack segment
Code segment
Heap segment
None of the above
When applied to a variable, what does the unary "&" operator yield?
The variable's address
the variable's right value
the variable's binary form
the variable's value
#include<stdio.h>
int main()
{
int a=5;
a*=a;
printf("%d",a);
return 0;
}
The Output of the above code
10
25
0
5
#include<stdio.h>
int main()
{
int a, b;
a = 5;
b = a++ / 2;
printf("%d", b);
return 0;
}
What will be the output of the above C program?
compile-time error
3
2
None of these
#include<stdio.h>
int main()
{
int x;
x = 5;
printf("%d ", x);
printf("%d ", x--);
printf("%d", x);
return 0;
}
What will be the output of the above C program?
5
4
4
5
4
3
5
5
4
5
5
5
