Home / Engineering / Object Oriented Programming (OOP) / Question

M

Mr. Dubey • 51.43K Points
Coach

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.
Correct answer : Option (C) - by default all the struct members are public while by default class members are private.

Share

Discusssion

Login to discuss.