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

Answer Posted / solaimuthu manikandan

1. C follows the procedural programming paradigm while C++
is a multi-paradigm language(procedural as well as object
oriented)

In case of C, importance is given to the steps or
procedure of the program while C++ focuses on the data
rather than the process.
Also, it is easier to implement/edit the code in case of
C++ for the same reason.


2. In case of C, the data is not secured while the data is
secured(hidden) in C++

This difference is due to specific OOP features like
Data Hiding which are not present in C.

3. C++ supports function overloading while C does not

4. We can use functions inside structures in C++ but not in

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is interface in oop?

660


What is difference between pop and oop?

603


What is oops in programming?

562


What are the three parts of a simple empty class?

1456


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6483






What is encapsulation example?

545


Why interface is used?

549


Which language is not a true object oriented programming language?

640


Which is better struts or spring?

616


What does and I oop mean?

612


Can we create object of abstract class?

575


What is static modifier?

630


What is an interface in oop?

591


What is pure oop?

597


#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

2164