what is difference between c and c++
Hi aspirant,
In JAVA, a new keyword is used to allocate memory of an object or array. The new object or array can be of any type. Then it return a suitable non zero pointer to the object. The new keyword is used for adding new table slot entries.
Also Yes, the new operator always allocates memory for the object on the heap. Unlike C++, objects in Java cannot be created on the stack. Local primitive types, and local references to object types, both take up "stack" memory, as do they both when passed as parameters to methods.
Thank You.
Hello,
Following are some main difference between C++ and C language:
- C language is an procedural language that does not support Object Oriented Programming whereas
- C++ is a combination of both procedural and Object Oriented Programming .
- C does not support function and operator overloading whereas C++ supports these.
- C does not have Namespace feature whereas C++ uses Namespace feature to avoid name collisions.
- C uses functions for input/output. For example scanf and printf whereas C++uses objects for input output. For example cin and cout.
- C does not provide direct support for error handling (also called exception handling) whereas C++ provides support for exception handling.
Hope this helps
Thank you
C is a structural or procedural oriented programming language which is machine-independent and extensively used in various applications.
C is the basic programming language that can be used to develop from the operating systems (like Windows) to complex programs like Oracle database, Git, Python interpreter, and many more. C programming language can be called a god's programming language as it forms the base for other programming languages.
C++ is a special-purpose programming language developed by at Bell Labs circa 1980. C++ language is very similar to C language, and it is so compatible with C that it can run 99% of C programs without changing any source of code though C++ is an object-oriented programming language, so it is safer and well-structured programming language than C.
Dear student,
Difference between C Language and C++
>>>>C Language is a low level language and C++ is a high level language.
>>>>C Language is a procedural and C++ is object oriented language.
>>>>C++ is a superset of C Language and C Language is a subset of C++.
>>>>C++ contains 63 keywords where as C Language contains 32 key words.
Hope this information was useful.
Good Luck!!