Q. The constants in C++ are also known as?

  • (A) pre-processor
  • (B) literals
  • (C) const
  • (D) none
πŸ’¬ Discuss
βœ… Correct Answer: (B) literals

Q. Using which of the following keywords can an exception be generated?

  • (A) threw
  • (B) throws
  • (C) throw
  • (D) catch
πŸ’¬ Discuss
βœ… Correct Answer: (C) throw

Q. Identify the size of int datatype in C++.

  • (A) 1 byte
  • (B) 2 bytes
  • (C) 4 bytes
  • (D) Depends on compiler
πŸ’¬ Discuss
βœ… Correct Answer: (D) Depends on compiler

Q. Which of the following types is the language C++?

  • (A) Procedural
  • (B) Statically typed language
  • (C) Dynamically typed language
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) Statically typed language

Q. What is the ASCII value of ‘\0’ character?

  • (A) 32
  • (B) 24
  • (C) 48
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (D) 0

Q. Identify the format string among the following.

  • (A) &
  • (B) \n
  • (C) %d
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (C) %d

Q. What is do-while loop also known as?

  • (A) Exit control
  • (B) Entry control
  • (C) Per tested
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) Exit control

Q. Identify the correct range of signed char.

  • (A) -256 to 255
  • (B) -128 to 127
  • (C) 0 to 255
  • (D) 0 to 127
πŸ’¬ Discuss
βœ… Correct Answer: (B) -128 to 127

Q. Choose the size of the below struct.

Code:
Struct{
Int a;
Char b;
Float c;
}
  • (A) 2
  • (B) 4
  • (C) 7
  • (D) 10
πŸ’¬ Discuss
βœ… Correct Answer: (C) 7

Q. Identify the logical AND operator.

  • (A) ||
  • (B) &&
  • (C) &
  • (D) !
πŸ’¬ Discuss
βœ… Correct Answer: (B) &&