Difference between Class and Struct.

Answer Posted / ravish

Structure is a value type variable, but a class is a
reference type variable.
We can create an object of a class but not for a structure.
Structures does not have function definition but a class has..

Is This Answer Correct ?    6 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to set file pointer to beginning c?

894


Write a program to swap two numbers without using the third variable?

792


How do I convert a string to all upper or lower case?

855


What is the difference between printf and scanf )?

782


hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

1859


How does selection sort work in c?

803


How can I do serial ("comm") port I/O?

903


What is the difference between declaring a variable by constant keyword and #define ing that variable?

2995


How many bytes are occupied by near, far and huge pointers (dos)?

892


how to write a c program to print list of fruits in alpabetical order?

2059


What are local static variables? How can you use them?

835


Where are some collections of useful code fragments and examples?

935


Differentiate between a structure and a union.

996


Is fortran still used in 2018?

791


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

1511