What is the Difference between Class and Struct?
Answer Posted / satvir kaur
STRUCTURE CLASS
1.structure by default is 1. class by default is private
public.
2.structure does not 2.class provide data hiding.
provide data hiding.
3.A structure would be the 3.class would be the collection
collection of related data. of data & code which handels
data.
CAN U TELL ME MORE DIFFERENCE BETWEEN LIKE THIS PLZ TELL ME
AS EARLY AS POSSIBLE I AM WAITING
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is the g value paradox?
What does the c preprocessor do?
What is the use of printf() and scanf() functions?
What are the advantages of using new operator as compared to the function malloc ()?
What are c preprocessors?
When is a null pointer used?
What is the need of structure in c?
Explain what is the difference between #include and #include 'file' ?
Is array name a pointer?
What is a sequential access file?
Can a variable be both const and volatile?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
Explain what does it mean when a pointer is used in an if statement?
How can I find the modification date of a file?
how to introdu5ce my self in serco