What are the differences between a struct in C and in C++?

Answer Posted / anoop chaurasiya

c structure does not support the concept of data hiding but
in approach of c++ class support the concept of data hiding.

Is This Answer Correct ?    17 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is it called c++?

569


What does new in c++ do?

558


What is an overflow error?

604


What are formatting flags in ios class?

597


Who discovered c++?

547






I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

593


What are the five basic elements of a c++ program?

566


Which is most difficult programming language?

567


What do you mean by friend class & friend function in c++?

609


What is the C-style character string?

590


What are the various compound assignment operators in c++?

533


What is general format for a prototype?

584


Explain how an exception handler is defined and invoked in a Program.

574


What is a v-table?

636


How long it will take to learn c++?

600