Font size
WorksheetsC Quiz 1
Total questions: 20
Worksheet time: 14mins
How many keywords are there in C Language ?
30
22
32
36
What will be the output of the given code?
4 6
4 4
6 6
6 4
What will be the output of the given code?
34
garbage error
compilation error
runtime error
What will be the output of the given code?
4
5
6
7
What will be the output of the given code?
1
0
12
6
What will be the output of the given code?
Temperature in Fahrenheit is 41.00
Temperature in Fahrenheit is 37.00
Temperature in Fahrenheit is 0.00
Compilation Error
What will be the output of the given code?
12
Compilation Error
Garbage
10
What will be the output of the given code?
7
0
1
6
What will be the output of the given code?
3
0
1
2
Which of the following declarations are invalid?
1. short int x;
2. signed short x;
3. short x;
4 .unsigned short x;
All are valid
3 and 4
1
2
What will be the output of the given code?
135
+INF
-121
-8
What will be the output of the given code?
266
-121
+INF
9
What will be the output of the given code?
same
not same
What will be the output of the given code?
same
not same
float x = 2.17;
double y = 2.17;
long double z = 2.17;
printf("%f %lf %Lf",x,y,z);
printf(“%f %f %f”,x,y,z);
printf("%f %ff %fff",x,y,z);
printf("%f %lf %llf",x,y,z);
Which of the following is the correct way to define a constant 'PI' with a value of 3.14 in C?
#define PI 3.14
const float PI = 3.14;
PI = 3.14;
define PI 3.14;
What will be the output?
1
2
3
4
What will be the output?
5
address of 'x'
Garbage Value
Error
What will be the output?
15
25
Address of 'a' + Address of 'b'
Error
What will be the value of x after the following lines are executed?
int x = 5;
int ptr = &x;
*ptr = 10;
5
10
Address of x
Error
