+ 1
What is the difference between C and C++
I need exact answers pls👍
5 Respostas
+ 2
A few differences:
1 C is a procedural (aka structural) programming language.
In addition to begin procedural, C++ is also an object oriented programming language.
2 In C language, the solution is achieved through a sequence of procedures or steps. Therefore, C is a function driven language.
C++ can model the whole solution in terms of objects and that makes the solution better organized. C++ is an object driven language.
3 Concept of virtual functions is not present in C.
C++ offers the facility of using virtual functions.
4 Operator overloading is not possible in C.
C++ allowsoperator overloading.
5 Data in C functions is not secured. Data can be easily accessed by other external functions.All the data in C++ can be put inside objects. This provides better data security.
6 C is a middle level language.C++ is a high level language.
7 C programs are divided intomodules and procedures.C++ programs are divided intoclasses and functions.
8 C programs use top-down approach.C++ programs use bottom-up approach.
9 In C, the main() function can be called from other functions.In C++, the main()function can not be called from other functions. The program execution begins from main()function.
10 C language does not provide the feature of namespace. Namespaces are available in C++.
+ 2
the other few :
11 Exception handling is not easy in C. It has to be done by using other functions.C++ provides exception handling through Try and Catch block.
12 Inheritance is not possible in C.Because C++ is an object oriented language, inheritance is possible.
13 In C, all the variables must be declared at the beginning of a scope.C++ allows declaring variables anywhere within the scope. This allows us to declare a variable when we use it for the first time.
14 In C, function overloading is not possible. Function overloading is to use two functions with the same name within a scope.Function overloading is possible in C++
15 Standard Input in C is received through scanf()function whereas standard output is given throughprintf() function. C++ uses cin>>and cout>> as standard input and output functions respectively.
16 C programs are saved in files with extension .c C++ programs are saved in files with extension .cpp
17 Mapping between data and functions is difficult in C. In C++ data and functions are easily mapped through objects.
18 In C, polymorphism is not possible.Being a fully object oriented language, C++ offers polymorphism.
19 C supports only built-in data types. C++ supports both built-in and user-defined data types.
+ 1
"++"
+ 1
😎😎😎😎😎😎🍓
+ 1
ohhhh