1 of 14

PPTs of C and C++ Language

2 of 14

What is C?

  • C is a high-level structured oriented programming language, used in general-purpose programming .
  • C works with an in-built complier, as it works on converting C from being a programming language into a machine readable coded language.  
  • C is the most preferred language for decades now, due to its high performance, remarkable efficiency and its portability.
  • C is a successor of 'Basic Combined Programming Language' (BCPL) called B language.

3 of 14

What are the advantages of C?

  •  �Portable: Its portability allows code to run on different computers and different operating systems without making any change.
  • Efficient: It is a general-purpose programming language. Therefore it works efficiently.
  • Case-sensitive: You need to be very careful while writing the code as it treats lowercase and uppercase letter differently.
  • Memory Manipulation and allocation: It has the ability to manipulate arbitrary memory addresses. It also allows allocating the memory dynamically.
  • Middle-level language: It merges the features of both low level and high-level languages in itself.

4 of 14

What are the disadvantages of C?

  • C language is devoid with the terminology and the concept of OOPS which is a very popular and an important concept these days among all high-level programming language.
  • No Strict type checking possible.
  • No checks for runtime
  • It doesn’t give us the provision of having a namespace.
  • It also doesn’t have the concept of the constructor as well as a destructor.

5 of 14

Why should we use C language?

  • It makes the code size small.
  • It is efficient, portable, structured and well understood.
  • It has only 32 keywords which are easy to remember.
  • It is near to Assembly language as code written in C language runs as fast as code written in assembly language.
  • It has Pointers which connects hardware like as kernel, drivers to a system, because of this reason C will always be in use.

6 of 14

What are the characteristics of C?

  • Low-level memory access: The lightweight programming language requires a low level of memory access and hence is a good fit for system programming.
  • Simplified keyword set: Rich and easy to understand and use a set of simplified keywords that meet one of the most important characteristics of this language
  • The clean style: This language focuses on keeping the code neat and tidy and hence the code flow is clean.
  • Pointer mechanism: The efficient use of pointer and addressing mechanism in C language makes it a unique and a different characteristic from all other programming languages.

7 of 14

 What are applications of c?

8 of 14

What is C++?

  • C++ is one of the most flexible and efficient general-purpose programming languages which is a superset of C programming language where most tools and libraries supported in C could be used in C++ as well.
  • C++ is a cross-platform language that can be used to create high-performance applications.
  • C++ was developed by Bjarne Stroustrup, as an extension to the C language.
  • C++ gives programmers a high level of controlover system resources and memory.

9 of 14

What are the characteristics of C++?

  •  An object is an entity on which we would talk about and would create programs using it.
  • Any entity in real life such as table, board, duster, etc., could be an object.
  • The second feature is the class which is a group of objects.
  • Classes consist of all the functions and the variables in a program.
  • Encapsulation internally hides the operation of a function. For, e.g., when we ride a bike, we press the accelerator but doesn’t know what’s happening behind the scenes or how the engine is working.
  • In layman terms, it wraps the data into a class, and hence only the function is allowed to access the data.

10 of 14

What are the characteristics of C++?

  • Inheritance gives a class the ability to use the features and properties of its parent class.
  • The inherited class could be of type Public, Private, and Protected. Also, new features could be added to the child class as well.
  • The inheritance could be single level, multi-level, multiple, and even hierarchical.
  • Polymorphism is the property in which one entity could have multiple forms which allow the object to behave differently in different situations.
  • It could be static as well as dynamic.
  • At run-time, objects could communicate among each other by sending data to and fro with the help of message passing interface.

11 of 14

What are the applications of C++?

  • C++ is widely used in the Gaming industry. Various companies hire people with a knowledge of C++ to build interactive games for them.
  • In software like Adobe Photoshop or Illustrator, C++ is used as well.
  • We can use C++ to create web browsers like Mozilla Firefox and compilers.
  • The operating systems are also programmed in C++.The medical industry used C++ to build most of their software.
  • Few of the other programming languages like Java are built using the C++ language.

12 of 14

What are the advantages of C++?

  • C++ is a very efficient language which is fast and reliable.
  • C++ has a wide range of usage and hence learning the language makes it easier to grasp the Object Oriented Programming Concept.
  • C++ makes it easier to learn other programming languages as well.

13 of 14

What are the disadvantages of C++?

  • C++ could often be hard to master.
  • The error messages in C++ could be extended and often difficult to debug.
  • It could be difficult to access the libraries in C++ even.
  • The code could be prone to errors as C++ doesn’t provide type-checking.

14 of 14

What are the components of C++?

  • First Component :The first component in this program is the header file denoted by #include<iostream> command which contains the cout command that is being used to print ‘Hello World’ in this case.
  • Second Component :The second component is the ‘int main()’ statement which is the Master Program Function and is a prerequisite of every C++ program to have the main function at the beginning of execution. The opening parenthesis after the main should have a matching closing parenthesis. The ‘int’ is the return type.
  • Third Component :The third component is the declaration of variables which in this case are ‘d’ and ‘i’. A variable is assigned a name with regards to which it stores data in the memory. It needs to support the C++ inbuilt data types.
  • Fourth Component :The Program Statement is another component of C++. In this case, the for loop is used to copy values from one variable to another. Comments are also included in the program using the “//”
  • Fifth Component :Operators are another component in C++.