become expert | help | login
refer a friend - earn nickels!!
 advanced

  Ask & Discuss Questions with Community & Experts

Moderation Team
  500 chars left
Ask experts Expert Question: what different between c and c++
Reply Forum Index -> Computer Science originally posted here on IIT-JEE / AIEEE community   
Email  
Author Message
raman (0)

New kid on the Block

Olaaa!! Perrrfect answer. 0  [0 rates]

raman's Avatar

total posts: 1    
Offline
what different between c and c++
    

Confused about AIPMT Prep? Discuss with counselor! Book Session NOW! »      advertisement

JAI (12)

Cool preppie

Olaaa!! Perrrfect answer. 2  [3 rates]

JAI's Avatar

total posts: 99    
Offline
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++.
  this reply:   5 points  (with Olaaa!! Perrrfect answer.   in 1   votes   )     [?]
 
You have to be logged on to rate
  

Confused about AIPMT Prep? Discuss with counselor! Book Session NOW! »      advertisement

siDDhESwaR MuKhErjEE (358)

Blazing preppie

Olaaa!! Perrrfect answer. 54  [98 rates]

siDDhESwaR MuKhErjEE's Avatar

total posts: 608    
Offline

The main difference lies in the fact that C++ is an object oriented programming language. User Defined datatypes called classes can be used in C++; but such datatypes cannot be used in C.

  this reply:   5 points  (with Olaaa!! Perrrfect answer.   in 1   votes   )     [?]
 
You have to be logged on to rate
  

Confused about AIPMT Prep? Discuss with counselor! Book Session NOW! »      advertisement

nix (63)

Scorching preppie

Olaaa!! Perrrfect answer. 9  [18 rates]

nix's Avatar

total posts: 247    
Offline
C--> (1)does not support OOP concepts.C++-->(1)supports OOP concepts
  this reply:   5 points  (with Olaaa!! Perrrfect answer.   in 1   votes   )     [?]
 
You have to be logged on to rate
  

Confused about AIPMT Prep? Discuss with counselor! Book Session NOW! »      advertisement

Anoop Verma (0)

New kid on the Block

Olaaa!! Perrrfect answer. 0  [0 rates]

Anoop Verma's Avatar

total posts: 5    
Offline

 The basic difference is that C is a procedural language, while C++ is a OOP language. So all the OOPs concepts like Data Hiding, Data Encapsulation, Data Abstration, Inheritance and Polymorphism can be implemented using C++. All these make the complex programming task handling easy.

But this doesn't mean that C is a lower grade language. It has its own beauty, as the codes written using C can be more compact. It uses pointers extensively, while C++ has got a "reference" which has wide use replacing pointers.

Pointers make direct memory address easy, and so C is still used to write programs for embedded systems.

 

  this reply:   0 points  (with Olaaa!! Perrrfect answer.   in 0   votes   )     [?]
 
You have to be logged on to rate
  

Confused about AIPMT Prep? Discuss with counselor! Book Session NOW! »      advertisement

Suresh Kumar (2605)

Forum Expert

Olaaa!! Perrrfect answer. 459  [614 rates]

Suresh Kumar's Avatar

total posts: 1342    
Offline

hello dear

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 reply:   0 points  (with Olaaa!! Perrrfect answer.   in 0   votes   )     [?]
 
You have to be logged on to rate
  

Confused about AIPMT Prep? Discuss with counselor! Book Session NOW! »      advertisement

Suresh Kumar (2605)

Forum Expert

Olaaa!! Perrrfect answer. 459  [614 rates]

Suresh Kumar's Avatar

total posts: 1342    
Offline

 hello dear

  • 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++.

  this reply:   0 points  (with Olaaa!! Perrrfect answer.   in 0   votes   )     [?]
 
You have to be logged on to rate
  

Confused about AIPMT Prep? Discuss with counselor! Book Session NOW! »      advertisement

 
reply Forum Index -> Computer Science
Go to: 
Sponsored Links