Question: What is the difference between a C + + struct and class? Question 1 options: 1 ) A class cannot access functions from iostream.h 2

What is the difference between a C++ struct and class?
Question 1 options:
1)
A class cannot access functions from iostream.h
2)
A struct cannot access functions from iostream.h
3)
In a struct the default accessibility is public, whereas in classes the default is private
4)
There is no difference
5)
A struct cannot have private members
6)
None of the other options
7)
In a struct the default accessibility is private, whereas in classes the default is public

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!