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 stack unwinding?
Why pointer is used in c++?
What does return 0 do in c++?
Explain public, protected, private in c++?
What is the best c++ ide?
Is c++ platform dependent?
When do you call copy constructors?
Is c++ the best programming language?
What is the difference between passing by reference and passing a reference?
What is the difference between a definition and a declaration?
Write is a binary search tree? Write an algo and tell complexity?
What is the meaning of string in c++?
What is low level language in simple words?
Write a program to find the Factorial of a number
What is pointer to member?