1. 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.
2. C structures have a diferent behaviour compared to c++ structures. Structures in c do not accept functions as their parts.
3. C input/output is based on library and the prcesses are carried out by including functions. C++ i/o is made through console commands cin and cout.
4. 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.
5. C does not support new or delete commands. The memory operations to free or alllocate memory in c are carried out by malloc() and free().
6. 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.
7. 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++.
8. 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().
9. 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.
10. C has a top down approch whereas c++ has a bottom up approach.
11. in c a character constant is automatically elevated to and integer whereas in c++ this is not the case.
12. In c declaring the global variable several times is allowed but this is not allowed in c++.
Difference between c and c++
Started by Chinmoy, Mar 20 2008 02:31 AM
38 replies to this topic
#1
Posted 20 March 2008 - 02:31 AM
God is real... unless declared an integer
my blog :: http://techarraz.com/
|
|
|
#3
Posted 08 April 2008 - 07:50 AM
Every time I see his signature, my math background kicks in: the integers are a subset of the reals, therefor declaring God an integer doesn't make him not real.
#5
Posted 09 April 2008 - 09:40 AM
Xav said:
Do you believe in God?
Yes, and Jesus as described in the New Testament of the Bible.
#7
Posted 19 May 2008 - 08:22 AM
Hi all... Im just newbie wan to learn this programming... But Im not sure which one is better for a newbie... Hope u all can help me... :confused:
#8
Posted 20 May 2008 - 11:29 AM
Welcome to CodeCall! Actually, neither of them is better for a newbie. I suggest learning Visual Basic - there's an excellent book called Sams' Teach Yourself Visual Basic 2005 in 24 Hours. It's not a day job, but it makes things as simple as possible.
#9
Posted 26 May 2008 - 04:33 AM
thx Xav...
#11
Posted 26 May 2008 - 09:51 PM
Firstly, you CANNOT decide on starting a new language just like that. If you want to go for some application development with GUI and less botheration about the background coding, then maybe VB or smalltalk has something for you, but if you want to code for the first time, ui think c++ is the place to begin. It is easy, has the base syntaxes which are common to many other languages and has meanngful codes. So if someone would want to seitch from c++ to any other languager it would be easy but to start with VB, switching to other languages gives a hard time. Moreover with VB, youll never get to know issues of portability, memory management etc..
God is real... unless declared an integer
my blog :: http://techarraz.com/


Sign In
Create Account


Back to top









