Unit1 1
Unit1 1
Kukutla Alekhya
Copyright 2023 ©, ISBAT University, All rights reserved.
Learning Objectives
• Introducing the syntax and structure of C++ programming language, including basic data types,
control structures, functions, classes, and objects.
• Helping learners to understand the differences between C++ and other programming languages
such as C and Java.
• Teaching learners how to write and execute basic C++ programs using an integrated development
environment (IDE) or a compiler.
• Providing an overview of the standard C++ library, including its built-in functions and data
structures.
• Giving learners hands-on practice with C++ programming by guiding them through several examples
and exercises.
2
INTRODUCTION
Extension to Clanguage.
Case-sensitive.
C++ history
• C++ programming language was developed in 1980 by Bjarne Stroustrup at bell laboratories of AT&T
(American Telephone & Telegraph), located in U.S.A.
History of C++
Early 1980s: Bjarne Stroustrup (Bell Lab)
Provides capabilities for object-oriented programming
Objects: reusable software components
Object-oriented programs
FEATURES
OOPS Features
C++ supports and allows user defined operators (i.e Operator
Overloading) and function overloading
Exception Handling
Inline Functions
1) Simple
C++ is a simple language because it provides a structured approach (to break the problem into
parts), a rich set of library functions, data types, etc.
4) Rich Library
C++ provides a lot of inbuilt functions that make the development fast. Following are the libraries
used in C++ programming are:
<iostream>
<cmath>
5) Memory Management
C++ provides very efficient management techniques. The various memory management operators help save the
memory and improve the program's efficiency. These operators allocate and deallocate memory at run time. Some
common memory management operators available C++ are new, delete etc.
6)Quicker Compilation
C++ programs tend to be compact and run quickly. Hence the compilation and execution time of the C++ language is
fast.
7)Extensible
C++ programs can easily be extended as it is very easy to add new features into the existing program.
8) Object-Oriented
In C++, object-oriented concepts like data hiding, encapsulation, and data abstraction can easily be implemented using
keyword class, private, public, and protected access specifiers. Object-oriented makes development and maintenance
easier.
9)Compiler based
C++ is a compiler-based programming language, which means no C++ program can be executed
without compilation. C++ compiler is easily available, and it requires very little space for storage. First,
we need to compile our program using a compiler, and then we can execute our program.
10) Reusability
With the use of inheritance of functions programs written in C++ can be reused in any other program
of C++.
type variable-name;
cout << "Hello world" << endl << " and universe" << endl;
int sum = 10 + 2;
cout << "sum = " << sum << endl;
cout << 45 << " km. = ";
cout << 45 * 0.62 << " miles" << endl;
© ISBAT UNIVERSITY – 3/25/2020
2020.
Stream Input
Data will be read into the variables in the same order they are in the cin statement
int a, b, anynumber;
cin >> b >> anynumber >> a;
first the value for b, then the value for anynumber, then the value of a must be entered by the
user using the keyboard
#include<iostream>
using namespace std;
main()
{
int x;
int y;
16
To Do
Thank you