in Object Oriented Programming
16,934 views
0 votes
0 votes
A struct is the same as a class except that

(A) there are no member functions.

(B) all members are public.

(C) cannot be used in inheritance hierarchy.

(D) it does have a this pointer
in Object Oriented Programming
16.9k views

1 Answer

1 vote
1 vote
Best answer
Option B is correct since, by default, all members of a struct are public whereas in a class, by default, all members are private.
selected by

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true