difference between c and c++?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Is it possible to get the source code back from binary file?
What is a stack? How it can be implemented?
what is Member Functions in Classes?
Can we specify variable field width in a scanf() format string? If possible how?
How do you test your code?
When should we use container classes instead of arrays?
What is the maximum combined length of command line arguments including the space between adjacent arguments?
Refer to a name of class or function that is defined within a namespace?
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
Define linked lists with the help of an example.
What is the output of: String a1 = "Hello"; String a2 = "world!"; String* s1 = &a2; String& s2 = a1; s1 = &a1; s2 = a2; std::cout << *s1 << " " << s2 << std::endl;
How do you compile the source code with your compiler?