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
How much is c++ certification?
What is a catch statement?
Explain the concept of memory leak?
Is c++ a programming language?
What parameter does the constructor to an ofstream object take?
Why c++ is so important?
What is c++ in english?
Can you overload the operator+ for short integers?
What are the data types in c++?
Which programming language is best?
Can we overload operator in c++?
How the endl and setw manipulator works?
Carry out conversion of one object of user-defined type to another?
What is runtime errors c++?
Array base access faster or pointer base access is faster?