Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 9

Introduction to

Programming in C and C+
+
Submitted by: Rochisha Tewari
Year: 2nd
Branch : CSE
Submitted to : Ms. Jigyasha Arora
Brief History of C and C++
• Created by Dennis Ritchie in 1972, C became one of the most widely
used programming languages.
• C++ was developed by Bjarne Stroustrup as an extension of C,
introducing the concept of object-oriented programming.
Advantages of Using C and C++
High Efficiency

C and C++ allow for low-level memory manipulation, resulting in efficient code execution.

Wide Hardware Compatibility

These languages can be used to develop software for a variety of platforms and devices.

Structured and Modular Approach

C and C++ promote modular code development, making it easier to manage and maintain
complex projects.
4.

Fundamentals of C
1 Variables and Data Types
Each variable in C has an associated data type. It specifies the type of data that the variable can store
integer, character, floating, double, etc. Each data type requires different amounts of memory and has
operations which can be performed over it. The data type is a collection of data with values having fi
meaning as well as its characteristics.
2
2 Control Structures
The control statements used in the C language help a user to specify a program control’s flow.
In simpler words, the control statements help users specify the order of execution of the instructions p
program. These make it possible for the program to make certain decisions, perform various tasks repe
even jump from any one section of the code to a different section.
3 Functions
A function in C is a set of statements that when called perform some specific task. It is the basic build
program that provides modularity and code reusability. The programming statements of a function are
{ } braces, having certain meanings and performing certain operations.

4. Pointers
These are one of the core components of the C programming language. A pointer can be used to store t
address of other variables, functions, or even other pointers. The use of pointers allows low-level mem
dynamic memory allocation, and many other functionality in C.
Fundamentals of C++

1 Classes and Objects

Class is a user defined data type that has


data members and member functions
Inheritance 2 whereas an object is an instance of class
The capability of a class to
.
derive properties and characteristics
from another class .
3 Polymorphism
The word “polymorphism” means
having many forms. In simple words,

Templates we can define polymorphism


4
as the ability of a message to be
The simple idea is to pass
. displayed in more than one form.
the data type as a parameter
so that we don’t need to
write the same code
for different data types.
Code snippets:
Common Applications of C and C++

Game Development 🎮 Embedded Systems 🌐 Operating Systems

From AAA titles to casual mobile From smart home devices to C and C++ are used to build the
games, C and C++ power the medical implants, C and C++ are core components of operating
majority of the gaming industry. the languages of choice for systems, enabling efficient
developing embedded systems. management of computer
resources.

System Software 💽

Antivirus programs, compilers,


and debuggers are often
developed in C and C++ due to
their low-level capabilities.
PROJECT:
Q. To build a cricket application

You might also like