Question
What is the difference between the following person structure and person class?struct Person{char name[51];int age;};class Person{char name[51];int age;};
Step 1
In the struct Person: ``` struct Person { char name[51]; int age; }; ``` The members (name and age) have public access by default. This means that they can be accessed directly from any part of the code where the struct is visible. Show more…
Show all steps
Your feedback will help us improve your experience
Carlene Jimenez and 94 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
What are some differences between class I and class II transposable elements?
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD