Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Detailed differance in C language and C++ language?

This is a discussion on Detailed differance in C language and C++ language? within the C and C++ forums, part of the Software Development category; Detailed differance in C language and C++ language?...

Go Back   Geeks Talk > Software Development > C and C++
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 12-09-2007
Junior Member
 
Join Date: Sep 2007
Location: thane
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
prachidamle30 is on a distinguished road
Detailed differance in C language and C++ language?

Detailed differance in C language and C++ language?
Reply With Quote
The Following User Says Thank You to prachidamle30 For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 12-14-2007
Junior Member
 
Join Date: Dec 2007
Location: Coimbatore,Tamilnadu, India
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
chibionos is on a distinguished road
Red face As i can tell .. you could have atleast searched in Google :P

Anyways,

C is a Structural Programming Language.
Were as C++ is an Object Oriented Programming Language.

C programs are difficult to use in modular development method than in C++.

In C program structures cannot contain member function were as in C++ structures can contain member function.

C has no templates.

This will give the most significant differences between the two languages.

Reply With Quote
  #3 (permalink)  
Old 12-14-2007
Expert Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 514
Thanks: 29
Thanked 63 Times in 61 Posts
susarlasireesha will become famous soon enough
Re: Detailed differance in C language and C++ language?

C was the C++ predecessor. As it's name implies, alot of C remains in C++. Although not actually being more powerful than C, C++ allows the programmer to more easily manage and operate with Objects, using an OOP (Object Oriented Programming) concept.

C++ allows the programmer to create classes, which are somewhat similar to C structures. However, to a class can be assigned methods, functions associated to it, of various prototypes, which can access and operate within the class, somewhat like C functions often operate on a supplied handler pointer.

Although it is possible to implement anything which C++ could implement in C, C++ aids to standarize a way in which objects are created and managed, whereas the C programmer who implements the same system has alot of liberty on how to actually implement the internals, and style among programmers will vary alot on the design choices made.

In C, some will prefer the handler-type, where a main function initializes a handler, and that handler can be supplied to other functions of the library as an object to operate on/through. Others will even want to have that handler link all the related function pointers within it which then must be called using a convention closer to C++.

C++ applications are generally slower at runtime, and are much slower to compile than C programs. The low-level infrastructure for C++ binary execution is also larger. For these reasons C is always commonly used even if C++ has alot of popularity, and will probably continue to be used in projects where size and speed are primary concerns, and portable code still required (assembly would be unsuitable then).
Reply With Quote
  #4 (permalink)  
Old 12-14-2007
Junior Member
 
Join Date: Mar 2006
Location: Mumbai
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Ankit Vasavada is on a distinguished road
Post Re: Detailed differance in C language and C++ language?

Hy Prachi
what the above member say i am Agree with you
If you want the Programmetical difference then do one thing
write a Simplest program you know in TC editor and save this file with ".C " Extension then execute it it will execute

and save this same Program with CPP it will execute successfully
now change your editor to TC 2.0 or lower and do same then you will find that Cpp file can`t run on that editor of C

then the program written in c will execute on C++ compiler but the c++ program cannot bo compile on C Compiler
Reply With Quote
  #5 (permalink)  
Old 12-19-2007
Contributing Member
 
Join Date: Nov 2007
Location: bangalore
Posts: 54
Thanks: 6
Thanked 6 Times in 4 Posts
rahulvegi is on a distinguished road
Re: Detailed differance in C language and C++ language?

c:
- it is structure oriented program
- it does not provide polymorphism.
- all varibles must be declared at the top
- it doesn't provide exception handling.
- no communication between methods

c++:
- object oriented programming language, which means every method and variables are accessed through objects.
- it provides encapsulation,inheritence and polymorphism.
- varaibles are declared any where in the program (reusability).
- it provides exption handling.
- there is a comunication between classes.
Reply With Quote
  #6 (permalink)  
Old 12-21-2007
Junior Member
 
Join Date: Dec 2007
Location: chennai
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
prasannalakshmi is on a distinguished road
Re: Detailed differance in C language and C++ language?

There is no explicit pointers concept like c in c++.
Reply With Quote
  #7 (permalink)  
Old 03-13-2008
Junior Member
 
Join Date: Mar 2008
Location: jhansi
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
swati_narula is on a distinguished road
Re: Detailed differance in C language and C++ language?

hi,
C is procedure oriented language whereas C++ is oop's(Object oriented lang).So,C++ supports all the features of oops like an capsulation,polymorphism and abstraction etc.
Another diff is that c is middle level language where as c++ is high level language.
Best of luck
Reply With Quote
Reply

  Geeks Talk > Software Development > C and C++

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
GD-001 Among all the OOPS Language, which one is the best? Why it is the best? admin Group Discussions 19 12-14-2007 02:34 AM
Which script language we should know Geek_Guest LoadRunner 1 09-06-2007 12:10 PM
ASM keyword in C language Geek_Guest C and C++ 1 08-21-2007 02:01 AM
Events in C# language Geek_Guest C# 2 04-11-2007 04:09 AM
C Language - The Preprocessor Lokesh M C and C++ 1 06-17-2006 07:41 AM


All times are GMT -4. The time now is 08:36 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved