Here is a listing of C test questions on “Arithmetic Operators” along with answers, explanations and/or solutions:
1. What is the output of this C code?
a) Compile time error
b) -1
c) 1
d) Implementation defined
View Answer
b) -1
c) 1
d) Implementation defined
View Answer
Answer:b
2. What is the output of this C code?
a) Compile time error
b) -1 1
c) 1 -1
d) Implementation defined
View Answer
b) -1 1
c) 1 -1
d) Implementation defined
View Answer
Answer:b
3. What is the output of this C code?
a) Implementation defined
b) 1
c) 3
d) Compile time error
View Answer
b) 1
c) 3
d) Compile time error
View Answer
Answer:b
4. What is the output of this C code?
a) Implementation defined
b) -1
c) -3
d) Compile time error
View Answer
b) -1
c) -3
d) Compile time error
View Answer
Answer:b
5. What is the value of x in this C code?
a) 3.75
b) Depends on compiler
c) 24
d) 3
View Answer
b) Depends on compiler
c) 24
d) 3
View Answer
Answer:c
6. What is the output of this C code?
a) Value of x is 2.3
b) Value of x is 1
c) Value of x is 0.3
d) Compile time error
View Answer
b) Value of x is 1
c) Value of x is 0.3
d) Compile time error
View Answer
Answer:d
7. What is the output of this C code?
a) Value of x is 1
b) Value of x is 2
c) Value of x is 3
d) Compile time error
View Answer
b) Value of x is 2
c) Value of x is 3
d) Compile time error
View Answer
Answer:a
www.cinterviews.com appreciates your contribution please mail us the questions you have to cinterviews.blogspot.com@gmail.com so that it will be useful to our job search community
No comments:
Post a Comment