πŸ“Š CPP Programming
Q. At which time does the static_cast can be applied?
  • (A) Compile-time construct
  • (B) Runtime construct
  • (C) Both Compile-time & Runtime construct
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (A) Compile-time construct
πŸ“Š CPP Programming
Q. Which function is used to position back from the end of file object?
  • (A) seekg
  • (B) seekp
  • (C) both seekg & seekp
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (A) seekg
πŸ“Š CPP Programming
Q. String class have a concat() function that is used to _____________________
  • (A) Replace old string by new string
  • (B) Add two strings
  • (C) Append one string at end of another string
  • (D) Remove a string from end of one string
πŸ’¬ Discuss
βœ… Correct Answer: (C) Append one string at end of another string
πŸ“Š CPP Programming
Q. Which among the following is/are type(s) of this pointer?
  • (A) const
  • (B) volatile
  • (C) const or volatile
  • (D) int
πŸ’¬ Discuss
βœ… Correct Answer: (C) const or volatile
πŸ“Š CPP Programming
Q. Which is the pointer which denotes the object calling the member function?
  • (A) Variable pointer
  • (B) This pointer
  • (C) Null pointer
  • (D) Zero pointer
πŸ’¬ Discuss
βœ… Correct Answer: (B) This pointer
πŸ“Š CPP Programming
Q. Which property is shown most when upcasting is used?
  • (A) Code reusability
  • (B) Code efficiency
  • (C) Complex code simple syntax
  • (D) Encapsulation
πŸ’¬ Discuss
βœ… Correct Answer: (C) Complex code simple syntax
πŸ“Š CPP Programming
Q. If multiple inheritance is implemented, which upcasting will be correct?
  • (A) Upcast to first base class listed in inheritance
  • (B) Upcast to any base class
  • (C) Upcast to send base class listed in inheritance
  • (D) Upcast is not possible
πŸ’¬ Discuss
βœ… Correct Answer: (B) Upcast to any base class
πŸ“Š CPP Programming
Q. When are the pointer types known for upcasting the objects?
  • (A) Compile time
  • (B) Runtime
  • (C) Source code build time
  • (D) Doesn’t apply to pointer types
πŸ’¬ Discuss
βœ… Correct Answer: (A) Compile time
πŸ“Š CPP Programming
Q. Which among the following is a mandatory condition for downcasting?
  • (A) It must not be done explicitly
  • (B) It must be done implicitly
  • (C) It must be done explicitly
  • (D) It can’t be done explicitly
πŸ’¬ Discuss
βœ… Correct Answer: (C) It must be done explicitly
πŸ“Š CPP Programming
Q. Which container provides random access iterators?
  • (A) vector
  • (B) deque
  • (C) sort
  • (D) both vector & deque
πŸ’¬ Discuss
βœ… Correct Answer: (D) both vector & deque

Jump to