UrbanPro

Learn IT Courses from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Can u tell the Difference between struct and class in C++? OR why struct is value type and class is reference type? Note : Dont say syntax difference

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

Software Professional Trainer with 26+ years of Experience in Software Design and Development

In C++ struct all the members(member variables and member functions) are public by default. In C++ class all the members(member variables and member functions) are private by default; value type means there will be two memory location, in reference there is no new memory location. Both variable...
read more
In C++ struct all the members(member variables and member functions) are public by default. In C++ class all the members(member variables and member functions) are private by default; value type means there will be two memory location, in reference there is no new memory location. Both variable will be same. read less
Comments

IT Professional Trainer with 15 years of experience in IT Industry

In C++, a structure is same as class except the following differences: 1) Members of a class are private by default and members of struct are public by default. 2) When deriving a struct from a class/struct, default access-specifier for a base class/struct is public. And when deriving a class,...
read more
In C++, a structure is same as class except the following differences: 1) Members of a class are private by default and members of struct are public by default. 2) When deriving a struct from a class/struct, default access-specifier for a base class/struct is public. And when deriving a class, default access specifier is private. read less
Comments

16 Yrs of Experience in Teaching

Area of datamembers and datafunctions in struct are by default public , while class having private, Storage of struct and class are different heap and stack so..
Comments

B.Tech(Information Technology) Diploma(Information Technology)

refrence not take memory while struct take memory strut will not use inheritance class will use it
Comments

View 2 more Answers

Related Questions

What is C? Where it is used ?
C has the advantage that it is a relatively small language, which makes it easy to implement a C compiler (whereas a C++ compiler is a monster to write), and makes it easier to learn the language. C...
Chandi
Hi this is Aamir Shaikh from Mumbai, want to ask a question from experts of 3d modeling? Please help.
Hi this is Aamir Shaikh, Greetings from Anigra Training Academy. Please. feel free to ask and clarify your doubts.
Aamir
0 0
8
Need Develops online training instructor -Urgent
Hi I am conducting DevOps training program online and batch is going to start soon. Update me with timing and date you want to start
Suresh
Need career switch from manual/QTP to a testing domain which is in demand and has less skilled resources..Please advise
You can join my training classes on Selenium using java. That helps to boost your career and salary as well..!
Bhavya
How to write macros in excel?
in excel press Alt + F11 or Right click in worksheet tab -> Click View Code. VBA Editior will open Write following test vba script to test Sub TestMessage() MsgBox "Test message from Excel...
Vidyarajeev

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

What is a VBA Module?
VBA code is stored and typed in the VBA Editor in what are called modules As stated on the VBA Editor page, a collection of modules is what is called a VBA project Every major Microsoft Office product...

How Motivation Affects Learning and Behavior
Motivation directs behavior toward particular goals. Motivation leads to increased effort and energy. Motivation increases the amount of effort and energy that learners expend in activities directly...

What You Need to Know About Test Automation In Agile
Software development has transformed over time. Developers have gone from executing a project in the “waterfall” method to the “agile” method. Due to digitization of businesses,...

C #-Program Sample Application
//using system namespace using System; //Namespace declaration namespace first{ //Class declaration class helloworld { //Main method public static void Main() { //Statement to print output on console...

SQL And or Operator
SQL AND & OR Operators The AND & OR operators are used to filter records based on more than one condition. The SQL AND & OR Operators The AND operator displays a record if both the first...

Recommended Articles

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

Read full article >

Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Looking for IT Courses ?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for IT Courses Classes?

The best tutors for IT Courses Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn IT Courses with the Best Tutors

The best Tutors for IT Courses Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more