What is the Difference between "C structure" and "C++
structure"?

Answer Posted / jayesh pawar

1)In "C++" Structure we can specify the data and functions as public,private or protected but in "C" Structure we can't.

2)In "C" Structure Variable initialization must contains the keyword struct but in C++ not required.

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of virtual destructor?

828


What are single and multiple inheritances in c++?

782


How do you define a class in c++?

830


What are the advantages of inheritance in c++?

868


When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?

830


What is the two main roles of operating system?

733


Can you please explain the difference between using macro and inline functions?

741


What is an iterator?

934


Write a function to find the nth item from the end of a linked list in a single pass.

755


What is lambda expression c++?

776


Is swift a good first language?

787


What is an undefined reference/unresolved external symbol error and how do I fix it?

847


How is new() different from malloc()?

848


How many types of scopes are there in c++?

792


What is using namespace std in c++?

808