what is the main difference between c and c++?

Answer Posted / ashish kumar

string variable take four bytes in c++ .whereas in c string
variable takes 3 bytes
c++ use bottom up approach to solve a problem.and c uses top
down approach to solve the problem.
c breaks the big problem into sub problems by using
procedures and function and then solve that.c++ combine the
small problems and then make it to be a solution.

Is This Answer Correct ?    17 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why multiple inheritance is not possible?

594


What is basic concept of oop?

696


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1145


write a program to find 2 power of a 5digit number with out using big int and exponent ?

1891


Can you inherit a private class?

631






Can a destructor be called directly?

597


What is encapsulation in oop?

601


What are the 3 pillars of oop?

611


Can we override main method?

603


#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


What is oops and why we use oops?

569


How do you define a class in oop?

626


officer say me - i am offered to a smoking , then what can you say

1578


c++ program to swap the objects of two different classes

1759


What is pure oop?

597