Difference between Class and Struct.
Answer Posted / swetcha
The only difference between a struct and a class is in the
default access. By default, all the members of a struct are
public whereas in a class, al the members are private. The
same is true for the default inheritance type: a struct
entails public inheritance by default whereas a class
entails private inheritance.
| Is This Answer Correct ? | 98 Yes | 23 No |
Post New Answer View All Answers
How can this be legal c?
What does c mean before a date?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
Is using exit() the same as using return?
What is define c?
Why isn't it being handled properly?
What is context in c?
What are the different types of errors?
Why dont c comments nest?
What does static variable mean in c?
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
What are the salient features of c languages?
What is string length in c?
Explain what is the best way to comment out a section of code that contains comments?
Where define directive used?