Q. Which of the following statements is correct?

  • (A) Data items in a class must be private.
  • (B) Both data and functions can be either private or public.
  • (C) Member functions of a class must be private.
  • (D) Constructor of a class cannot be private.
πŸ’¬ Discuss
βœ… Correct Answer: (B) Both data and functions can be either private or public.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
143
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Priyanka Tomar
Publisher
πŸ“ˆ
95%
Success Rate