What is the Difference between struct and class in terms of Access Modifier? | CPP MCQs

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.

Ans: C

0 comments:

Post a Comment

Blogger news