What are the differences between a struct in C and in C++?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / shakti singh khinchi
In C, structures never support constructors and destructors
whereas C++ supports both of them.
Is This Answer Correct ? | 13 Yes | 1 No |
Answer / shakti singh khinchi
In C, structures does not support "virtual" mechanism like
virtual functions whereas C++ structures supports virtual
mechanism like classes.
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / jyoti
C++ was based on C and retains a great deal of the
functionality. C++ does not retain complete source-level
compatability with C. There are a few gotchas for C++
programmers trying to write C code, and C programmers trying
to compile with a C++ compiler.
Is This Answer Correct ? | 8 Yes | 8 No |
Answer / nithin
what is the use of struct in c then? wat advantages does it
offer?
Is This Answer Correct ? | 1 Yes | 8 No |
How do I exit turbo c++?
Which programming language is best to learn first?
When should we use multiple inheritance?
What are stacks? Give an example where they are useful.
What apps are written in c++?
How many types of casting are there in C++? When is a dynamic cast,static_cast,reinterpret cast used?
Friend functions can access private and protected members of a class.
why and when we can declar member fuction as a private in the class?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
What is size of a empty class?
7 Answers Microsoft, Tata Elxsi, Wipro,
What is stl containers in c++?
Define whitespace in C++.