What is the Difference between "C structure" and "C++
structure"?
Answer Posted / satsen singh
C Structure :-
1. Only variables of different data types can be declared, functions are not allowed
2. Direct access to data members is possible
3. ‘struct’ data type is not treated as built in type – use of ‘struct’ necessary to declare objects
4. Member variables cannot be initialized inside a structure
C++ Structure :-
1. In C++ structure declaration functions can also be declared
2. The members declared in a C++ structure is public by default
3. While declaring an object the keyword ‘struct’ is omitted in C++
| Is This Answer Correct ? | 26 Yes | 5 No |
Post New Answer View All Answers
What is data structure in c++?
What are the 2 main types of data structures?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
What relational operators if statements in c++?
If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?
Explain what are single and multiple inheritances in c++?
Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()
What is the difference between an external iterator and an internal iterator?
What is setbase c++?
Is python written in c or c++?
What is the equivalent of Pascal's Real a) unsigned int b) float c) char
When one must use recursion function? Mention what happens when recursion functions are declared inline?
What is the full form of stl in c++?
What is fixed in c++?
What are the two shift operators and what are their functions?