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 microsoft c++ redistributable?
Describe the advantage of an external iterator.
Is python better than c++?
How can we access protected and private members of a class?
What is the use of setprecision in c++?
How would you use qsort() function to sort an array of structures?
Is c++ fully object oriented?
When you overload member functions, in what ways must they differ?
What is the difference between a "copy constructor" and an "assignment operator" in C++?
What is a far pointer? where we use it?
Explain pass by value and pass by reference.
What is buffer and example?
What do you mean by late binding?
What is namespace & why it is used in c++?
Can non graphic characters be used and processed in C++?