what isthe difference between c structure and c++ class

Answer Posted / jeremiah

The default scope of a C struct is public, whearas the
default scope of a C++ class is private.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1381


what is the drawback of classical methods in oops?

2908


What is property in oops?

556


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2156


What is the purpose of enum?

573






How do you explain polymorphism?

580


Why is destructor used?

574


What is the difference between a constructor and a destructor?

600


Are polymorphisms mutations?

688


Why we use classes in oop?

568


What are the three parts of a simple empty class?

1446


How to use CMutex, CSemaphore in VC++ MFC

4319


Why is object oriented programming so hard?

606


What is difference between class and object with example?

554


Explain the advantages of inheritance.

662