Question 1
|
What is the output of this C code?
Its not zero
| |
Its zero
| |
Run time error
| |
None
|
Question 2
|
What is the output of this C code?
0 9
| |
0 8
| |
1 8
| |
1 9
|
Question 3
|
What is the output of this C code?
6
| |
Junk value
| |
Compile time error
| |
7
|
Question 4
|
What is the output of this C code?
returns 1
| |
returns 2
| |
Varies
| |
Compile time error
|
Question 5
|
What is the output of this C code?
Run time error
| |
Aries
| |
-5
| |
5
|
Question 6
|
What is the output of this C code?
5
| |
6
| |
Undefined behaviour
| |
Compile time error
|
Question 7
|
What is the output of this C code?
2
| |
1
| |
0.5
| |
Undefined behaviour
|
Question 8
|
What is the output of this C code?
Compile time error
| |
1
| |
0
| |
Undefined behaviour
|
Question 9
|
What is the type of the below assignment expression if x is of type float, y is of type int? y = x + y;
int
| |
float
| |
There is no type for an assignment expression
| |
double
|
Question 10
|
What is the value of the below assignment expression (x = foo())!= 1 considering foo() returns 2
2
| |
True
| |
1
| |
0
|
Question 11
|
Operation “a = a * b + a” can also be written as:
a *= b + 1;
| |
(c = a * b)!=(a = c + a);
| |
a = (b + 1)* a;
| |
All of the mentioned
|
Question 12
|
for c = 2, value of c after c <<= 1;
c = 1;
| |
c = 2;
| |
c = 3;
| |
c = 4;
|
Question 13
|
What is the output of this C code?
1 1
| |
1 2
| |
2 1
| |
2 2
|
Question 14
|
What is the output of this C code?
Addition of a and n.
| |
Subtraction of a and n.
| |
Multiplication of a and n.
| |
Division of a and n.
|
Question 15
|
Which of the following is an invalid assignment operator?
a %= 10;
| |
a /= 10;
| |
a |= 10;
| |
None of the mentioned
|
Check Your Answers:
1. A
2. B
3. C
4. D
5. C
6. D
7. A
8. A
9. A
10. A
11. D
12. D
13. C
14. C
15. D
0 comments:
Post a Comment