difference between c and c++?
Answers were Sorted based on User's Feedback
Answer / t.shasu
C:C is procedural oriented language with specific focus on
method
c++:c++ object oriented progrmming with focus of classes
and object acess mechanisam
c:scanf & printf for read & write the input & output.
c++:extraction & insertion operators are used.
c:c having Macros.
c++;Having inline function to fast registering access.
c:and so on...
c++:and so on....
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / arpit gupta
1.C follows procedural programming language while c++ follows multi paradigm language(procedural as well as object oriented)
2.in c data is not secured,but in c++ data is secured(hidden)like data hiding which is not in c.
3.c is a low level language & c++ is a high level language
4.c is a top down approach but c++ is a bottom up approach
5.We can use functions inside structures in C++ but not in C.
6.C is function-driven while C++ is object-driven
7.C++ supports function overloading while C does not
8.C++ allows the use of reference variables while C does not
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / first
MY DEAR FRIEND
C FIRST YEAR MAI PADAYA JATA HAI.
C++ SECOND YEAR MAI PADAYA JATA HAI.
JO FIRST MAI HO WO C PADNE K LIE READY RAHO.
AND JO SECOND YEAR MAI HO WO C++ PADNE K LIE READY RAHO
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / radha krishna
C++, as the name suggests is a superset of C. As a matter of fact, C++ can run most of C code while C cannot run C++ code. Here are the 10 major differences between C++ & C...
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 is a low-level language while C++ is a middle-level language (Relatively, Please see the discussion at the end of the post)
C is regarded as a low-level language(difficult interpretation & less user friendly) while C++ has features of both low-level(concentration on whats going on in the machine hardware) & high-level languages(concentration on the program itself) & hence is regarded as a middle-level language.
4. C uses the top-down approach while C++ uses the bottom-up approach
In case of C, the program is formulated step by step, each step is processed into detail while in C++, the base elements are first formulated which then are linked together to give rise to larger systems.
5. C is function-driven while C++ is object-driven
Functions are the building blocks of a C program while objects are building blocks of a C++ program.
6. C++ supports function overloading while C does not
Overloading means two functions having the same name in the same program. This can be done only in C++ with the help of Polymorphism(an OOP feature)
7. We can use functions inside structures in C++ but not in C.
In case of C++, functions can be used inside a structure while structures cannot contain functions in C.
8. The NAMESPACE feature in C++ is absent in case of C
C++ uses NAMESPACE which avoid name collisions. For instance, two students enrolled in the same university cannot have the same roll number while two students in different universities might have the same roll number. The universities are two different namespace & hence contain the same roll number(identifier) but the same university(one namespace) cannot have two students with the same roll number(identifier)
9. The standard input & output functions differ in the two languages
C uses scanf & printf while C++ uses cin>> & cout<< as their respective input & output functions
10. C++ allows the use of reference variables while C does not
Reference variables allow two variable names to point to the same memory location. We cannot use these variables in C programming.
11. C++ supports Exception Handling while C does not.
C does not support it "formally" but it can always be implemented by other methods. Though you don't have the framework to throw & catch exceptions as in C++.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / radhika
1. C is the procedure oriented programming language.
C++ is the object oriented programming language.
2. C gives the important on the procedure insted of data.
C++ gives the important on the data.
3. C the data can pass through the fuction to function.
C++ the data is hide in the fuction and the data is stolen
through the external function.
4. C is the low level language.
c++ is the high level language.
5. C doesn't have the extra advantages to hide the functions like C++
C++ having extra benfits data can hide in the function
(encapsulation),polymorphism,templates,file
handling,inheritance.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / jyoti
*c is a middle level language,in this data can de divided
into functions.
*c++ is a high level language,in this data can be divided
int classes,
*c== has more features than c- language
such as polymorphism,inheritance,data
abstraction,encapsulation.
*c++ is a object oriented programming language.c- is a
procedure oriented programming language;
FINALLY I CONVAY
C LANGUAGE IS ROOT OF C++ LANGUAGE
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kasi
1)C is procedure oriented programming & c++ is object
oriented programming.
2}c gives importance to procedure that is functions rather
than data.
c++ is object oriented language and gives importance to
object that is data .
3)c is middle level language.
c++ is high level language
4)c is structured design,c++ is object oriented design
5)c is top-down approach,c++ is bottom-top approach
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / umamaheswari.k
1.'c' language has pointer concept but c++ hasn't pointer
concept.
2.c is a middle level language
3.c++ oops.
4c++ has inheritance concept but c has not inheritance
concept
Is This Answer Correct ? | 38 Yes | 41 No |
Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].
What is decltype c++?
What is the C-style character string?
How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?
What is main function in c++ with example?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
Write any small program that will compile in "C" but not in "C++"?
How to create a reference variable in C++
Explain the need for "Virtual Destructor"?
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
Is c++ vector a linked list?
Why is it difficult to store linked list in an array?