What is the difference between Class and Structure?
Answer Posted / eshetu
1. IN STRUCTURE THE DATA MEMBER BY DEFAULT IS PUBLIC BUT IN
CLASS THE DATA MEMBER ARE PRIVATE.
2. THE STRUCTURE ONLY CONTAIN DATA MEMBER BUT CLASS CONTAIN
DATA MEMBER & MEMBER FUNCTION.
3.IN STRUCTURE THE STRUCTURE NAME CAN'T STAND ALONE.BUT THE
CLASS NAME CAN STAND ALONE.
Is This Answer Correct ? | 10 Yes | 5 No |
Post New Answer View All Answers
What are the uses of typedef in a program?
What is tellg () in c++?
Is c++ a low level language?
Does c++ have finally?
Distinguish between a # include and #define.
What is the benefit of c++?
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
How does class accomplish data hiding in c++?
Write a program which uses functions like strcmp(), strcpy()? etc
Explain selection sorting?
Which is best ide for c++?
What is the oldest programming language?
What is the return value of the insertion operator?
What is class invariant in c++?
What is srand c++?