whats the difference between c and c++
Answers were Sorted based on User's Feedback
Answer / vivek
1>c is an procedural language and c++ is an object oriented.
2>c uses a TOP DOWN approach and c++ BOTTOM UP.
3>c++ introduces the idea of Data hiding using class..shere
in c there is no such facility for that purpose
4>c++ introduce the concept of the message passing with that
objects can communicate.
5>c++ has the inheritence, using it we can reuse our code.
6>Using polymorphism of c++ we can achieve the overloading
of operator and functions, but it is not possible in c.
there may be more difference on this but these are the main..
| Is This Answer Correct ? | 19 Yes | 0 No |
Answer / vivek kumar kanojia
C++ provides data hiding concept,using class and provide
facility for the data abstraction without showing background
details,whereas C does not support it.
C++ introduce the reusibility of code by inheritance but in
C it not avialable...
| Is This Answer Correct ? | 18 Yes | 1 No |
Answer / vishi
in c++ we can do nesting,inheritance which is not possible
in c.objects and classes are present in c++ not in c.
| Is This Answer Correct ? | 18 Yes | 3 No |
Answer / siva
so many we can say but the main difference is
C is structured oriented where as
C++ is object oreiented
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / mosin
c is structer oriented language.
c++ is object oriented language.
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / anjana
DIFFERENCE BETWEEN C AND C++
C c++
*STRUCTURED ORIENTED *OBJECT ORIENTED PROGRAMMING.
PROGRAMMING.
*RETURN TYPE IS NOT *RETURN TYPE IS MUST IN C++.
NEEDED.
*WE DIDN'T USE CLASS *WE ARE USING CLASS CONCEPT.
CONCEPT IN C.
*DATA HIDING IS NOT *DATA HIDING IS POSSIBLE.
POSSIBLE IN C.
*C IS A TOP DOWN APPROACH. *C++ IS A BOTTOM APPROACH.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / shweta kapatkar
c is the structured oriented language &
c++ is the object oriented language
this is the main difference in c & c++ other than
1.c uses a TOP DOWN approach and c++ BOTTOM UP approach
2.In c++ we can do nesting,inheritance which is not
possible in c. & many more
| Is This Answer Correct ? | 6 Yes | 0 No |
Why is polymorphism important in oop?
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow *b; a.x = 22; b = &a; a.x = 23; cout << b->x; return 0; }
What is the difference between abstraction and polymorphism?
Can we create object of interface?
I am DeePu sotware engineer working with EMC corporation ,recently I had attended mcafee interview . Their questions were at heights of stupidity , I don't know what they want , I am a developer with 4 year experienced .I am listing the questions asked 1:What is the flag in g++ to avoid structure padding 2:In wht order parameters are passed to stack 3:How you will edit code segment of an exe
Write a C++ program to conduct an election of a mayor.Declare a class ELECTION With the following specification: Data member: Name 25 character Age Integer symbol 1 character Member functions: To accept data for 20 contestant To accept symbol as voting from 100 voters. To declare the winner and the loser.
1 Answers Global Academy, Infotech,
What does the code "cout<<(0==0);" print? 1) 0 2) 1 3) Compiler error: Lvalue required
what type of questions
What are the 4 pillars of oop?
You have one base class virtual function how will call that function from derived class?
what is inline function?
What is the difference between Home and $Home?