Interviewer And Interviewee Guide

C++ Programmer Interview Question:

Please explain is there a difference between class and struct?

Submitted by: Muhammad
The only difference between a class and struct are the access modifiers. Struct members are public by default; class members are private. It is good practice to use classes when you need an object that has methods and structs when you have a simple data object.
Submitted by: Muhammad

Read Online C++ Programmer Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.