What is the difference b/w Structure & Class?

Answer Posted / mohan chaudhari

1.In structure there is no data encapsulation.
but in class, there is data encapsulation.
2.Data member in structure are not private .
In class they are private.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What math functions are available for integers? For floating point?

626


What does the c preprocessor do?

624


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

570


Explain pointers in c programming?

637


What are types of structure?

605






How can I read a binary data file properly?

635


When should structures be passed by values or by references?

586


FILE PROGRAMMING

1780


What is variables in c?

609


What is the difference between struct and union in C?

575


Explain #pragma statements.

605


What 'lex' does?

719


What is malloc return c?

601


What is bubble sort technique in c?

592


What is the use of sizeof () in c?

559