what defference between c and c++ ?

Answers were Sorted based on User's Feedback



what defference between c and c++ ?..

Answer / sambhunath samanta

Difference is given below.
1.c is the structure programming language where c++ is the object oriented language.
2.c does not support class but c++ support class.
3.c++ also called c as class,that is the advance version of c.
4.c++ have operator overloading while c does't have operator overloading

Is This Answer Correct ?    22 Yes 0 No

what defference between c and c++ ?..

Answer / vaishali bhajbhuje

1. c is structure language while c++ is an object oriented language.
2. Function overloading is possible in c++ because in c++ calling depends on the fun-name and parameter list.
3. c is topdown parsing.c++ is bottom up parsing.
4. c can don only static binding while c++ can done static as well as dynamic binding.

Is This Answer Correct ?    6 Yes 0 No

what defference between c and c++ ?..

Answer / sunil s patil

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.

Is This Answer Correct ?    1 Yes 0 No

what defference between c and c++ ?..

Answer / sunil s patil

Answer


c is not object oriented but c++ is object oriented


Actually c is a procedural programming language which
cann't face the real world problem. It has some drawback
like a global data is shared by all function and if in a
large program it is find out difficult that which function
uses which data.

On the other hand c++ is an object oriented programming
language which eliminate some pitfall of conventional or
procedural programming language. It is a concept or
approach for designing a new software. It is nothing to do
with any programming language although a programming
language which support the oops concept to make it easier
to implement.

This is the main different between c and c++.



in c we use scanf function as standard input function,while
in c++ we use streame cin>> for input.like this for output
in c we use printf function,while in c++ we use cout<< as a
output function.


in c we use #include<stdio.h>as iclusion file,while in c++
we use #include<iostreame>as inclusion file.


IN c-programe the main function could not return a value
but in the c++ the main function shuld return a value



A function can be declared in C as int fun();. This means
that fun()is a function without any argument or any number
of arguments.But in C++, this means that the function with
no argument at all.

Is This Answer Correct ?    0 Yes 0 No

what defference between c and c++ ?..

Answer / ayan

1>c is the procedural language & c++ is the object oriented
programming methodology.

2>In c++ there 3 types of operator u-nary,binary,ternary.
But in c there is only 2 types u-nary,binary.

Is This Answer Correct ?    0 Yes 0 No

what defference between c and c++ ?..

Answer / guest

1.c is the structure programming language where c++ is the
object oriented language.
2.c does not support class but c++ support class.
3.c++ also called c as class,that is the advance version of c.
4.c++ have operator overloading while c does't have operator
overloading

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

which header file contains main() function in c?

17 Answers   Google, HCL, TCS,


While(1) { } when this loop get terminate is it a infinite loop?

5 Answers  


I didn't count the ducks that I saw in line, but I do remember that one duck was in front of two ducks, another duck behind two ducks. How many ducks did I see?

2 Answers  


What are identifiers and keywords in c?

0 Answers  


How does pointer work in c?

0 Answers  






Explain indirection?

0 Answers  


Add 2 64 bit numbers on a 32 bit machine

3 Answers   EMC, Hyderabad Central University, NetApp,


A C E G H +B D F A I ------------ E F G H D

1 Answers   Infosys,


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

0 Answers   Wilco,


can any one tel me wt is the question pattern for NIC exam

0 Answers   NIC,


A stack can be implemented only using array?if not what is used?

3 Answers   InterGlobal,


What is identifiers in c with examples?

0 Answers  


Categories