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

Answer Posted / swetcha

C structure does not support member functions to be
declared in the structure whereas C++ structure can have
member functions declared in them

Is This Answer Correct ?    34 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of ::(scope resolution operator)?

640


What is object oriented programming (oop)?

610


Write a program which employs Recursion

718


You want to link a c++ program to c functions. How would you do it?

529


Which bitwise operator is used to check whether a particular bit is on or off?

583






Is C++ case sensitive a) False b) Depends on implementation c) True

608


What is doubly linked list in c++?

617


Is c the same as c++?

553


What does extern mean in a function declaration in c++?

689


Does c++ have string data type?

680


When should we use container classes instead of arrays?

572


What is difference between class and structure in c++?

607


What is the basic concept of c++?

565


What do you mean by enumerated data type?

564


What are the advantages of using pointers in a program?

666