Difference between Class and Struct.

Answer Posted / ajay prajapat

1. Structure is value type where is class is refrance
type.So class data is store in heap where as stuct data are
store in stack.

2. default type of function in struct is public where as
private in class

Is This Answer Correct ?    55 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

1783


How will you divide two numbers in a MACRO?

712


Do you know null pointer?

611


When should you use a type cast?

593


Explain what is the difference between functions getch() and getche()?

608






What are the types of data files?

729


How do I use void main?

631


Define C in your own Language.

640


What is include directive in c?

644


Explain what standard functions are available to manipulate strings?

613


What is the difference between typedef struct and struct?

600


How can I invoke another program or command and trap its output?

617


What does 3 periods mean in texting?

600


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

9656


What is the difference between #include and #include 'file' ?

604