difference between c and c++?

Answers were Sorted based on User's Feedback



difference between c and c++?..

Answer / reddy

• C does not have any classes or objects. It is
procedure and function driven. There is no concept of
access through objects and structures are the only place
where there is a access through a compacted variable. c++
is object oriented.
• C structures have a different behaviour compared to
c++ structures. Structures in c do not accept functions as
their parts.
• C input/output is based on library and the
processes are carried out by including functions. C++ i/o
is made through console commands cin and cout.
• C functions do not support overloading. Operator
overloading is a process in which the same function has two
or more different behaviours based on the data input by the
user.
• C does not support new or delete commands. The
memory operations to free or allocate memory in c are
carried out by malloc() and free().
• Undeclared functions in c++ are not allowed. The
function has to have a prototype defined before the main()
before use in c++ although in c the functions can be
declared at the point of use.
• After declaring structures and enumerators in c we
cannot declare the variable for the structure right after
the end of the structure as in c++.
• For an int main() in c++ we may not write a return
statement but the return is mandatory in c if we are using
int main().
• In C++ identifiers are not allowed to contain two
or more consecutive underscores in any position. C
identifiers cannot start with two or more consecutive
underscores, but may contain them in other positions.
• C has a top down approach whereas c++ has a bottom
up approach.
• In c a character constant is automatically elevated
to an integer whereas in c++ this is not the case.
• In c declaring the global variable several times is
allowed but this is not allowed in c++.

Is This Answer Correct ?    2 Yes 1 No

difference between c and c++?..

Answer / prashant cruise

basically c is based on console user interface(CUI) JAVA IS OBJEct oriented...

prashant cruise

Is This Answer Correct ?    2 Yes 1 No

difference between c and c++?..

Answer / p.madhupriya

c is a procedure oriented programing language .That points
to only procedural programs. c is a high level language .
c++ is a object oriented programing language .
c++ is a extension of c .that points to real world entities
. It contains extra features of c that are class
,objects,dynamic
binding,encapsulation,polymorphism,inheritance etc.

Is This Answer Correct ?    2 Yes 1 No

difference between c and c++?..

Answer / shivani

In c:Data is global and accessible to all the function of
the program without any restriction so,any function can
change the data which reduce the data security and
integrity.

In c++:Data and associated functions are binded together
into a single unit called object so the data of any object
can only be accessible by the function of that object
which protect data from unauthorized access ,thus
maintaning the data security and integrity.

Is This Answer Correct ?    1 Yes 0 No

difference between c and c++?..

Answer / mohd sarim

* C does not have any classes or objects. It is
procedure and function driven. There is no concept of access
through objects and structures are the only place where
there is a access through a compacted variable. c++ is
object oriented.

* C structures have a different behaviour compared to
c++ structures. Structures in c do not accept functions as
their parts.

* C input/output is based on library and the processes
are carried out by including functions. C++ i/o is made
through console commands cin and cout.

* C functions do not support overloading. Operator
overloading is a process in which the same function has two
or more different behaviours based on the data input by the
user.

* C does not support new or delete commands. The memory
operations to free or allocate memory in c are carried out
by malloc() and free().

* Undeclared functions in c++ are not allowed. The
function has to have a prototype defined before the main()
before use in c++ although in c the functions can be
declared at the point of use.

* After declaring structures and enumerators in c we
cannot declare the variable for the structure right after
the end of the structure as in c++.

* For an int main() in c++ we may not write a return
statement but the return is mandatory in c if we are using
int main().

* In C++ identifiers are not allowed to contain two or
more consecutive underscores in any position. C identifiers
cannot start with two or more consecutive underscores, but
may contain them in other positions.

* C has a top down approach whereas c++ has a bottom up
approach.

* In c a character constant is automatically elevated to
an integer whereas in c++ this is not the case.

* In c declaring the global variable several times is
allowed but this is not allowed in c++.

Is This Answer Correct ?    1 Yes 1 No

difference between c and c++?..

Answer / ks

ALTER PROC [dbo].[sp_PAYDETAIL]

@studentid INT,
@admitdate VARCHAR(50),
@paymode VARCHAR(50),
@amount VARCHAR(50),
@ddno VARCHAR(50),
@bankname VARCHAR(50),
@courseapply VARCHAR(50)
AS
INSERT INTO TBL_PAYMENT
(StudentId,Date,PayMode,Amount,DDNo,BankName,CourseApplied)
VALUES
(@studentid,@admitdate,@paymode,@amount,@ddno,@bankname,@cou
rseapply)
/////////////////////

ALTER PROC [dbo].[sp_SHOWRECEIPTINFO]
@studentid INT
AS
SELECT ReceiptNo,CourseApplied,Amount,Date
FROM TBL_PAYMENT
WHERE StudentId=@studentid
////////////////////////////////
ALTER PROC [dbo].[sp_SHOWRECEIPT]
@studentid INT
AS
SELECT First_Name,Last_Name FROM TBL_STUDENTDETAIL
WHERE StudentId=@studentid

Is This Answer Correct ?    1 Yes 1 No

difference between c and c++?..

Answer / by; rapchik

the main and major and important differnce of c and c++ is
spelling 'mistake' nothing else c is of one charactor where
as c++ is of 3 charactors.

Is This Answer Correct ?    0 Yes 0 No

difference between c and c++?..

Answer / satish kumar

* c is the procedure oriented programing
* C++ IS THE OBJECT ORIENTED PROGRAMING.
* C GIVE THE IMPORTANCE ON THE PROCEDURE INSTATED IN THE
DATA
* A COMPUTER LANGUAGE IS ONE OF THE WHICH CAN BE USED IN
THE COMMUNICATE WITH IN THE PROGRAM IN THE COMPUTER .C++ IS
AN OBJECT ORIENTED PROGRAMING LANGUAGE. IT WAS DEVELOPED
BY "BJAME STROUSTARP" AT AT&BELL LAB'S IN 1980'S
* C++ IS AN EXTENXION OF THE C WITH MAJOR ADDTITON OF THE
CLASS CONSTRUCT FEATURES.
* THE OTHER IMPORTANT FEATURES OF THE C++ ARE CLASSES,
INHERITANCE, FUNCTION OVERLAPPING ,OPERATOR OVERLODING.
* THE C++ IS A COLLECTION OF THE FUNCTIONS.
* C++ IS A FREE FORM LANGUAGE.
* C++ STATEMENTS TERMINATE WITH ;(SEMI COLON)

Is This Answer Correct ?    0 Yes 0 No

difference between c and c++?..

Answer / jayashri jali

->C is procedure oriented language and gives importance to
procedure that is functions rather than data.c is middle
level language.
->c++ is object oriented language and gives importance to
object that is data
c++ is high level language.
-> in c++ data will be secured means its a secured
programming language where as c is insecure.
using the properties in c++ like inheritance,function
overloading etc we can minimize the data redundancy.
c does not have such properties.
->c is top down approach, c is bottom up approach.

Is This Answer Correct ?    0 Yes 0 No

difference between c and c++?..

Answer / abc

'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 ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

when can we use copy constructor?

6 Answers   HP,


what is the use of void main() in C++ language?

0 Answers  


Difference between inline functions and macros?

0 Answers  


What do manipulators do?

0 Answers  


What is the oldest programming language?

0 Answers  






How do I write a c++ program?

0 Answers  


Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?

0 Answers  


A milk carton can hold 3.78 litres of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one litre of milk is $0.38, and the profit of each carton of milk is $0.27. Write a C++ program that prompts the user to enter the total amount of milk produced in the morning. Then display the number of milk cartons needed to hold milk, the cost of producing milk, and the profit for producing milk.

2 Answers  


What is meant by the term name mangling in c++?

0 Answers  


How many static variables are created if you put one static member into a template class definition?

0 Answers  


Problem 5: Hero's Formula is A method for calculating the area of a triangle when you know the lengths of all three sides. Let a, b, c be the lengths of the sides of a triangle. The area is given by:A= pp-ap-b(p-c) | wherep= a+b+c2 | | Write a C-language code to calculate area of triangle using above method. Take the three lengths of the triangle from the user and display the area that your program calculates.

0 Answers   Maxobiz,


What is the difference between method overloading and method overriding in c++?

0 Answers  


Categories