what is the main difference between c and c++?
Answers were Sorted based on User's Feedback
Answer / pratap
C:c is a structure oriented language C:c++ is a object oriented language
C: program the main function could not return a value
C++:c++ the main function should return a value
C:c data is not secured
C++:c++ is a secured
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / abhishek gautam
C is a procedural programming language whereas C++ is an
object oriented programming language
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / abhishek gautam
C does not supports operator overloading but C++ supports.
C focus on procedure whereas C++focus on data.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / prabhu
C is a Procedure Oriented Language(POP)
C++ is Object Oriented Programming Language(OOP)
C is Top-Down Approach
C++ is Bottom up Approach
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / bhagyasree
In c++ the data is secured as we have the concepts of data
hiding but in C the data is not secured.And moreover c is a
low level language whereas c++ is a middle level language.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / anky
C++ is an extension of C language. This means that you can
not only use the new features introduced with C++ but can
also use the power and efficiency of C language. C and C++
are no more language for writing compilers and other
languages, these general purpose languages are used
worldwide in every field.
Here is a list of differences between c and c++.
The main difference between C and C++ is that C++ is object
oriented while C is function or procedure oriented. Object
oriented programming paradigm is focused on writing programs
that are more readable and maintainable. It also helps the
reuse of code by packaging a group of similar objects or
using the concept of component programming model. It helps
thinking in a logical way by using the concept of real world
concepts of objects, inheritance and polymorphism. It should
be noted that there are also some drawbacks of such
features. For example using polymorphism in a program can
slow down the performance of that program.
On the other hand, functional and procedural programming
focus primarily on the actions and events, and the
programming model focuses on the logical assertions that
trigger execution of program code.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vani
C is procedural language while c++ is an object oriented and procedural language.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sonu
>C is Procedure Oriented Programming Language (POP).
->C++ is Object Oriented Programming Language (OOP).
->C is mostly used to develop system software.
->C++ is mostly used to modal real life problem to program and use to develop application programs.
->C program has extension .C
->C++ program has extension .cpp
->C uses the top-down approach.
->while C++ uses the bottom-up approach.
->C is function-driven.
->while C++ is object-driven.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / akash dilwaria
c is function driven while c++ is object driven,
c++ supports function overloading while c does not ;
c is a top down approach while c++ follows bottom up approach.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / santosh kumar
the main difference between c and c++ is c++ is more user
freindly when compared to c. even though c++ is a more
advanced language than c we have to make a note that it is
derived frm c and even now c has its own importance in
programing
| Is This Answer Correct ? | 0 Yes | 0 No |
Write a program to multiply 3x3 matrics
Can enum be null?
what is the main difference between sizeof() operator in c and c++
Question In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Question Submitted By :: Sunil Kumar I also faced this Question!! Rank Answer Posted By Re: In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Answer # 1 use copy constructors 0 Shanthila There is something to be taken care in destructor, in copy constructor, suppose the memory is assigned to the embedded member object pointer with the parameter passed value, but if some other objects of different class also are pointing to this memory, then if some one deletes the object then this class member pointer object will become dangling, or if the object is not deleted properly then there will be memory leak. Please suggest the design change required to handle or avoid this situation
What is an orthogonal base class?
1. Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)
define a string class. overload the operator == to compare two strings
2 Answers Birla, Ericsson, HCL, Infosys, Infotech, MCAS, Satyam,
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
write string class as your own class in java without using any built-in function
Does c++ support multilevel and multiple inheritance?
what is the difference between ERROR and EXCEPTION?
What is abstrac class?where is it use?