Q. What is a comment in c++?

  • (A) comments are executable
  • (B) comments are parts of the source code disregarded by the compiler
  • (C) comments are executed by the compiler to find the meaning of the comment
  • (D) All of above
πŸ’¬ Discuss
βœ… Correct Answer: (B) comments are parts of the source code disregarded by the compiler

Q. How many types of comments are there in c++?

  • (A) 4
  • (B) 3
  • (C) 2
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (C) 2

Q. Identify the correct extension of the user-defined header file in C++.

  • (A) .cpp
  • (B) .hg
  • (C) .h
  • (D) .hf
πŸ’¬ Discuss
βœ… Correct Answer: (C) .h

Q. Identify the incorrect constructor type.

  • (A) Friend constructor
  • (B) Default constructor
  • (C) Parameterized constructor
  • (D) Copy constructor
πŸ’¬ Discuss
βœ… Correct Answer: (A) Friend constructor

Q. C++ uses which approach?

  • (A) right -left
  • (B) Top-down
  • (C) left-right
  • (D) bottom -up
πŸ’¬ Discuss
βœ… Correct Answer: (D) bottom -up

Q. Which of the following data type is supported in C++ but not in C?

  • (A) int
  • (B) bool
  • (C) double
  • (D) float
πŸ’¬ Discuss
βœ… Correct Answer: (B) bool

Q. Identify the correct syntax for declaring arrays in C++.

  • (A) array arr[10]
  • (B) array{10}
  • (C) int arr[10]
  • (D) int arr
πŸ’¬ Discuss
βœ… Correct Answer: (C) int arr[10]

Q. Size of wchat_t is.

  • (A) 2
  • (B) 4
  • (C) 2 or 4
  • (D) Depends on number of bits in system
πŸ’¬ Discuss
βœ… Correct Answer: (D) Depends on number of bits in system

Q. Which of the following is “address of operator”?.

  • (A) *
  • (B) &
  • (C) []
  • (D) &&
πŸ’¬ Discuss
βœ… Correct Answer: (B) &

Q. identify the correct example for a pre-increment operator.

  • (A) ++n
  • (B) n++
  • (C) - -n
  • (D) +n
πŸ’¬ Discuss
βœ… Correct Answer: (A) ++n