what is the difference between class and structure in C++?

Answer Posted / murali

A class is inhertied to onther class but structure we
cannot inhertied

Is This Answer Correct ?    18 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is encapsulation used?

577


What polymorphism means?

620


What is the difference between inheritance and polymorphism?

585


which feature are not hold visual basic of oop?

1721


What is object in oops?

612






What is variable example?

593


What is oops in simple words?

577


What is the fundamental idea of oop?

634


What is polymorphism and types?

596


What does I oop mean?

614


Can destructor be overloaded?

594


what is graphics

2009


Can main method override?

583


What is an advantage of polymorphism?

589


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

2064