πŸ“Š Object Oriented Programming (OOP)
Q. What is the difference between struct and class in terms of Access Modifier?
  • (A) by default all the struct members are private while by default class members are public.
  • (B) by default all the struct members are protected while by default class members are private.
  • (C) by default all the struct members are public while by default class members are private.
  • (D) by default all the struct members are public while by default class members are protected.
πŸ’¬ Discuss
βœ… Correct Answer: (C) by default all the struct members are public while by default class members are private.
πŸ“Š Object Oriented Programming (OOP)
Q. What is a constructor?
  • (A) a class automatically called whenever a new object of this class is created.
  • (B) a class automatically called whenever a new object of this class is destroyed.
  • (C) a function automatically called whenever a new object of this class is created.
  • (D) a function automatically called whenever a new object of this class is destroyed.
πŸ’¬ Discuss
βœ… Correct Answer: (C) a function automatically called whenever a new object of this class is created.

Jump to