What is the Difference between Class and Struct?

Answer Posted / talib hassan

1.Structure cannot provide the re usability but class provide the re usability of code.
2. All the members of structure are public but a class provide the several types of accessing methods.
3. structure cannot support polymorphism concept but class provide polymorphism.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does 3 periods mean in texting?

600


Process by which one bit pattern in to another by bit wise operation is?

615


c program for searching a student details among 10 student details

1655


What is signed and unsigned?

645


What does do in c?

610






What is array of structure in c programming?

753


Why we use int main and void main?

537


Explain 'bit masking'?

655


What is meant by inheritance?

634


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

649


What is the benefit of using #define to declare a constant?

607


What are the different types of data structures in c?

608


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

713


Under what circumstances does a name clash occur?

692


What do you mean by c what are the main characteristics of c language?

572