What is the difference between Class and Structure?

Answer Posted / deepica

in classes we can declare variables and functions while in structure we can have only functions.In classes we have ACCESS SPECIFIER,while in structures we dont have any.Ic classes no Keyword is used ,while in Structures STRUCT keyword is used.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe exception handling concept with an example?

565


List down the guideline that should be followed while using friend function.

651


What do you understand by zombie objects in c++?

622


A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

3248


What things would you remember while making an interface?

566






What is lazy initialization in c++?

658


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

2043


What are formatting flags in ios class?

614


How do we balance an AVL Tree in C++?

645


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

625


What is linked list in c++?

697


What are the basic data types used in c++?

559


What is the default width for ouputting a long integer using the insertion operator?

695


How much is c++ certification?

591


What is encapsulation in c++?

676