0% found this document useful (0 votes)
26 views4 pages

Print

C++ was created by Bjarne Stroustrup at Bell Labs in the 1970s as an extension to C with object-oriented capabilities. It combines efficiency and low-level access to hardware with high-level abstraction capabilities. C++ is a popular language used in operating systems, graphical interfaces, embedded systems, and more due to its performance, portability, and ease of use. A C++ program is translated into machine code through a compiler and linker that converts the human-readable source code into executable binary instructions.

Uploaded by

shivakumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

Print

C++ was created by Bjarne Stroustrup at Bell Labs in the 1970s as an extension to C with object-oriented capabilities. It combines efficiency and low-level access to hardware with high-level abstraction capabilities. C++ is a popular language used in operating systems, graphical interfaces, embedded systems, and more due to its performance, portability, and ease of use. A C++ program is translated into machine code through a compiler and linker that converts the human-readable source code into executable binary instructions.

Uploaded by

shivakumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

2

C++ PROGRAMMING

INTRODUCTION TO C++
introduction

INTRODUCTION TO Characteristics of C++


C++
C++ Character Set

PROGRAMMING C++ Tokens

Prof. K ADISESHA Data Types of C++


(Ph. D)

I/O Operators of C++


Prof. K. Adisesha (Ph. D)

3 4
Introduction Introduction

History of C++: OOPs characteristics


The C++ programming language was created by Bjarne Stroustrup and his team at ➢ Modularity: Module is a logically self-contained unit that can be tested and executed independently.
Bell Laboratories (AT&T, USA) to help implement simulation projects in an object- ➢ Abstraction: It represents the essential features of an entity without including explanations or any
oriented and efficient way. background details about it.
➢ C++ is a superset of C because; any valid C program is valid C++ program too but not ➢ Data Encapsulation: Wrapping of data and functions into a single unit is called data encapsulation.
the vice versa is not true. ➢ Inheritance: The process by which objects of one class acquires the properties of the objects of
➢ C++ can make use of existing C software libraries with major addition of “Class another class.
Construct”. ➢ Polymorphism: The ability for a message to be processed in more than one form.
➢ This language was called “C with classes” and later in 1983, it was named “C++” by ➢ Dynamic Binding: Linking of a procedure call to the code to be executed when it is called.
Rick Mascitii. As the name C++ implies, C++ was derived from the C programming
➢ Message Passing: Passing message objects and invoking the function by the object by sending a
language: ++ is the increment operator in C. message is known as message passing.
Prof. K. Adisesha (Ph. D) Prof. K. Adisesha (Ph. D)
5 6
Introduction Introduction

OOPs Benefits OOPs Applications


➢ OOPs model the real world entity very well.
➢ Object oriented databases.
➢ Inheritance eliminates the redundancy (repetition) of code and hence supports code
reusability. ➢ Hypermedia, expert text and hypertext.
➢ Data hiding helps to build secured programs. ➢ Artificial intelligence and expert systems.
➢ Multiple instances (objects) can be created. ➢ Decision support systems and office automation systems.
➢ Work can be divided easily. ➢ Parallel programming and neural networks.
➢ OOPs can be easily upgraded from small to large systems. ➢ CAD, CAM, CIM systems.
➢ Complexity can be easily managed. ➢ Simulation and modeling.
➢ Message passing concept helps the objects to communicate and share data.
Prof. K. Adisesha (Ph. D) Prof. K. Adisesha (Ph. D)

7 8
Introduction Introduction

Why Use C++


Translating a C++ program
➢ C++ is one of the world's most popular programming languages.
➢ Computers execute binary instructions.
➢ C++ can be found in today's operating systems, Graphical User Interfaces, and embedded
systems. ➢ These binary instructions are known as machine instructions or machine code.
➢ C++ is an object-oriented programming language which gives a clear structure to programs ➢ The program creation process consists of the following steps:
and allows code to be reused, lowering development costs. Step 1 – Write the program in a computer language humans can read and understand (like C++),
➢ C++ is portable and can be used to develop applications that can be adapted to multiple Step 2 – Save the programs in text files as (.cpp) extension. Programs can be a few lines long and
platforms. reside in one file or can consist of many millions of lines of code and span thousands of files,
➢ C++ is fun and easy to learn! Step 3 – Run the source code files through a program called a compiler to generate object code for the
target computer,
➢ As C++ is close to C# and Java, it makes it easy for programmers to switch to C++ or vice
Step 4 – Run the object files through a program called a linker to produce an executable image.
versa
Prof. K. Adisesha (Ph. D) Prof. K. Adisesha (Ph. D)
9 10
Introduction Introduction
Translating a C++ program General Structure of C++ Program.
➢ C++ Install IDE: download and Install Turbo C++ or Install Codeblocks  Different programming languages have their own format of coding.
➢ The program execution process consists of the following steps:  The basic components of a C++program are:

◼ Comments or Documentation Section


◼ Pre-processor Directives (Linker Section):
◼ Definition
◼ Global Declaration
◼ main ( ) function
◼ Declarations
◼ Statements
Prof. K. Adisesha (Ph. D) Prof. K. Adisesha (Ph. D)

11 12
Introduction Characteristics of C++

General Structure of C++ Program Characteristics of C++:


➢ The basic components of a C++program are: Object-Oriented Programming:
➢ It allows the programmer to design applications like a communication between object
rather than on a structured sequence of code. It allows a greater reusability of code in a
more logical and productive way.
Portability:
➢ We can compile the same C++ code in almost any type of computer & operating
system without making any changes.
Modular Programming:
➢ An application’s body in C++ can be made up of several source code files that are
compiled separately and then linked together saving time.
Prof. K. Adisesha (Ph. D) Prof. K. Adisesha (Ph. D)
13 14
Characteristics of C++ Characteristics of C++

Characteristics of C++: Characteristics of C++:


C Compatibility: Flexibility:
➢ Any code written in C can easily be included in a C++ program without making any ➢ It is highly flexible language and versatility.
changes. Wide range of library functions:
Speed: ➢ It has huge library functions; it reduces the code development time and also reduces
➢ The resulting code from a C++ compilation is very efficient due to its duality as high- cost of software development.
level and low-level language. System Software Development:
Machine independent: ➢ It can be used for developing System Software Viz., Operating system, Compilers,
➢ It is a Machine Independent Language. Editors and Database.

Prof. K. Adisesha (Ph. D) Prof. K. Adisesha (Ph. D)

You might also like