Tuesday, November 22, 2022

C vs C++

What is c?

C is a general-purpose high-level programming language. It is used to develop portable applications and firmware. C was developed by Dennis Ritchie at Bell Labs in 1970. The first main application of C is the Unix Operating System.

What is C?

The main features of C include low-level access to memory, a simple set of keywords, and a clean style. C language is a suitable language for Operating system development. Many languages like PHP, Java, JavaScript, etc developed using the syntax of C language.C is a structural programming language and it is a very popular language.

Features Of C language

  1. C contains a certain number of keywords. The set of primitives like if for, while, switch, etc.
  2. There are many logical and mathematical operators and also includes bit manipulators.
  3. We can also apply many assignments on a single level.
  4. C not always required the return value of functions we can also ignore it.

Some example of where we use C programming language:

  1. Operating System
  2. Compilers
  3. Database
  4. Application Software
  5. System Software
  6. Network driver

What is C++?

C++ is known as an Intermediate language. It was developed by Bjarne Stroustrup and it is a combination of high level and low-level language.C++ is Object Oriented programming language and it is run on Windows, Linux, Mac OS or etc Operating System.

What-is-C++

C++ has many features with the OOPs concepts:

    1. Polymorphism
    2. Abstraction
    3. Encapsulation
    4. Inheritance

Difference between C and C++ programming languages

You can find many differences between C and C++. some highlighted differences are mentioned here.

CC++
1.Procedure Oriented Programming language.Object Oriented Programming language.
2.Focused on the Procedure.Focused on the Data more than procedure.
3.Programs are divided into small groups that is called functions.Programs are divided into objects.
4.Function can be shared through global data.Function can only share the data of the same class.
5.TOP-Bottom Approach is followed.Bottom -Up Approach is followed.
6.C is a subset of C++.C++ is a superset of C.
7.C contains 32 keywords.C++ contains 52 keywords.
8.scanf() and printf() functions are used for input/output in C.Cin and Cout are used for input/output in C++.
9.Exception Handling not supported.it’s supports Exception Handling.
10.Not Supports OOPs concept.Supports OOPs concepts.
11.stdio.h is used as header file.iostream.h is used as header file.
12.malloc() and calloc() functions is used for dynamic memory allocation, and free() for memory de-allocation.new operator is used for memory allocation and delete operator for memory de-allocation.
Priya Chauhanhttps://rkrknowledge.com/
Hi πŸ‘‹, Myself Priya Chauhan from India. Content Editor | Coder | PHP Developer | UI Designer. I try to learn something new every day and share that knowledge with my friends.

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

Stay Connected

29FansLike
36FollowersFollow
500SubscribersSubscribe

Most Popular

Recent Comments