Professional Documents
Culture Documents
Answer: a
Answer: a
Answer: a
Answer: b
5. How many types of comments are there in C++?
a) 1
b) 2
c) 3
d) 4
Answer: b
Explanation: There are two types of comments. They are double slash
and slash started.
Answer: c
Answer: a
Answer: a
Answer: a
Answer: a
Answer: c
Answer: b
Answer: a
14. Which of the following is not one of the sizes of the floating point
types?
a) short float
b) float
c) long double
d) double
Answer: a
Answer: b
16. It is guaranteed that a _____ has at least 8 bits and a _____ has at
least 16 bits.
a) int, float
b) char, int
c) bool, char
d) char, short
Answer: d
Answer: b
Answer: a
Answer: a
Answer: b
Answer: b
Answer: a
Answer: d
Answer: c
Answer: b
Explanation: Space, comma and $ cannot be used in a variable name.
Answer: c
Answer: d
28. Which of the following data type will throw an error on modulus
operation (%)?
a) char
b) short
c) int
d) float
Answer: d
Answer: d
Answer: d
Answer: b
Answer: d
Answer: b
Answer: b
Answer: a
Answer: c
Answer: c
Answer: b
Answer: a
Answer: d
43. Which looping process is best used when the number of iterations is
known?
a) for
b) while
c) do-while
d) all looping processes require that the iterations be known
Answer: a
Answer: a
45. Which loop is most suitable to first perform the operation and then
test the condition?
a) for loop
b) while loop
c) do-while loop
d) none of the mentioned
Answer: c
Answer: b
47. Which keyword is used to come out of a loop only for that iteration?
a) break
b) continue
c) return
d) none of the mentioned
Answer: b
Answer: b
Answer: a
Answer: a