SlideShare a Scribd company logo
OVERVIEW OF C LANGUAGE:
1.C language is known as structure oriented language or procedure oriented language
2.Employs top-down programming approach where a problem is viewed as a sequence of tasks to
be performed.
3.All program code of c can be executed in C++ but converse many not be possible
4. Function overloading Polymorphism, encapsulation, inheritance and operator overloading are not
possible.
5. Local variables can be declared only at the beginning of the block.
6. Program controls are through jumps and calls to subroutines.
7.For solving the problems, the problem is divided into a number of modules. Each module is a
subprogram.
8. Data abstraction property is not supported by procedure oriented language.
9. Data in procedure oriented language is open and can be accessed by any function.
OVERVIEW OF C++ LANGUAGE:
1. C++ can be considered as an incremental version of c language which consists all programming
language constructs with newly added features of object oriented programming.
2. C++ is object oriented programming language.
3. The file extension of C++ program is “.CPP”
4. Function overloading, Polymorphism, encapsulation, inheritance and operator overloading are
possible.
5. Variables can be declared in inline i.e. when required
6. In c++ more emphasis is give on data rather than procedures.
7. Data abstraction property is supported by c++.
8. Data access is limited. It can be accessed by providing various visibility modes both for data and
member functions.
9. Dynamic binding is supported by C++
DIFFERENCE BETWEEN PROCEDURE ORIENTED PROGRAMMING
(POP) & OBJECT ORIENTED PROGRAMMING (OOP)
DIFFERENCE BETWEEN PROCEDURE ORIENTED PROGRAMMING
(POP) & OBJECT ORIENTED PROGRAMMING (OOP)
BASIC STRUCTURE OF C++ LANGUAGE:
A C++ program should have one or more sections but the sequence of sections is
to be followed.
1. Documentation section
2. Linking section
3. Definition section
4. Global declaration section & class declarations
5. Member function definition
6. Main function
1. DOCUMENTATION SECTION :
1. Document section comes first and is used to document the use of logic or
reasons in your program.
2. It can be used to write the program's objective, developer and logic
details.
3. The documentation is done in C++ language with /* and */ . Whatever is
written between these two are called comments.
2. LINKING SECTION :
1. This section tells the compiler to link the certain occurrences of keywords or functions
in your program to the header files specified in this section.
2. e.g. #include<iostream>
using namespace std;
3. Directive causes the preprocessor to add the contents of the iostream file to the
program. It contains declarations for cout and cin.
4. cout is a predefined object that represents the standard output stream. The operator
<< is an insertion operator, causes the string in double quotes to be displayed on the
screen.
5. The identifier cin is a predefined object in C++ that corresponds to the standard input
stream. The operator >> is known as extraction operator. It extracts the value from the
keyboard and assigns it to the value variable on its right.
3. DEFINITION SECTION :
1. It is used to declare some constants and assign them some value. e.g.
#define MAX 25
2. Here #define is a compiler directive which tells the compiler whenever MAX is
found in the program replace it with 25.
4. GLOBAL DECLARATION SECTION :
1. Here the variables and class definitions which are used throughout the
program (including main and other functions) are declared to make them global
(i.e
accessible to all parts of program).
2. A CLASS is a collection of data and functions that act or manipulate
the data. The data components of a class are called data members and
function components of a class are called member functions.
3. A class can also termed as a blue print or prototype that defines the variable or
functions common to all objects of certain kind.
4. It is a user defined data type.
5. e.g. int i; //this declaration is done outside and before main()
5. SUB PROGRAM OR FUNCTION SECTION :
This has all the sub programs or the functions which our
program needs.
void display()
{
cout<<”C++ is better that C”;
}
6. MAIN FUNCTION SECTION :
 It tells the compiler where to start the execution.
main()
{
point from execution starts
}
main function has two sections
1. declaration section : In this the variables and their data types are
declared.
2. Executable section or instruction section : This has the part of
program which actually performs the task we need.

More Related Content

Similar to Oosd lecture unit 4 ppt introduction part

C++ Constructs.pptx
C++ Constructs.pptxC++ Constructs.pptx
C++ Constructs.pptx
LakshyaChauhan21
 
The smartpath information systems c plus plus
The smartpath information systems  c plus plusThe smartpath information systems  c plus plus
The smartpath information systems c plus plus
The Smartpath Information Systems,Bhilai,Durg,Chhattisgarh.
 
C programming
C programming C programming
C programming
Rohan Gajre
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
Mugilvannan11
 
Introduction of C++ By Pawan Thakur
Introduction of C++ By Pawan ThakurIntroduction of C++ By Pawan Thakur
Introduction of C++ By Pawan Thakur
Govt. P.G. College Dharamshala
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
Alok Jain
 
Book management system
Book management systemBook management system
Book management system
SHARDA SHARAN
 
Chapter vvxxxxxxxxxxx1 - Part 1 (3).pptx
Chapter vvxxxxxxxxxxx1 - Part 1 (3).pptxChapter vvxxxxxxxxxxx1 - Part 1 (3).pptx
Chapter vvxxxxxxxxxxx1 - Part 1 (3).pptx
rajinevitable05
 
Basic construction of c
Basic construction of cBasic construction of c
Basic construction of c
kinish kumar
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
TejaswiB4
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
TejaswiB4
 
C programming course material
C programming course materialC programming course material
C programming course material
Ranjitha Murthy
 
PPs16.pptx
PPs16.pptxPPs16.pptx
PPs16.pptx
Vamshi171
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
Subramanyambharathis
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
Amresh Raj
 
Cp week _2.
Cp week _2.Cp week _2.
Cp week _2.
shahidullah57
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,
Hossain Md Shakhawat
 
PROBLEM SOLVING
PROBLEM SOLVINGPROBLEM SOLVING
PROBLEM SOLVING
shahzadebaujiti
 

Similar to Oosd lecture unit 4 ppt introduction part (20)

C++ Constructs.pptx
C++ Constructs.pptxC++ Constructs.pptx
C++ Constructs.pptx
 
The smartpath information systems c plus plus
The smartpath information systems  c plus plusThe smartpath information systems  c plus plus
The smartpath information systems c plus plus
 
C programming
C programming C programming
C programming
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
Introduction of C++ By Pawan Thakur
Introduction of C++ By Pawan ThakurIntroduction of C++ By Pawan Thakur
Introduction of C++ By Pawan Thakur
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
 
Book management system
Book management systemBook management system
Book management system
 
Chapter vvxxxxxxxxxxx1 - Part 1 (3).pptx
Chapter vvxxxxxxxxxxx1 - Part 1 (3).pptxChapter vvxxxxxxxxxxx1 - Part 1 (3).pptx
Chapter vvxxxxxxxxxxx1 - Part 1 (3).pptx
 
Basic construction of c
Basic construction of cBasic construction of c
Basic construction of c
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
 
C programming course material
C programming course materialC programming course material
C programming course material
 
C tutorials
C tutorialsC tutorials
C tutorials
 
PPs16.pptx
PPs16.pptxPPs16.pptx
PPs16.pptx
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Cp week _2.
Cp week _2.Cp week _2.
Cp week _2.
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,
 
PROBLEM SOLVING
PROBLEM SOLVINGPROBLEM SOLVING
PROBLEM SOLVING
 

Recently uploaded

Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 

Recently uploaded (20)

Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 

Oosd lecture unit 4 ppt introduction part

  • 1. OVERVIEW OF C LANGUAGE: 1.C language is known as structure oriented language or procedure oriented language 2.Employs top-down programming approach where a problem is viewed as a sequence of tasks to be performed. 3.All program code of c can be executed in C++ but converse many not be possible 4. Function overloading Polymorphism, encapsulation, inheritance and operator overloading are not possible. 5. Local variables can be declared only at the beginning of the block. 6. Program controls are through jumps and calls to subroutines. 7.For solving the problems, the problem is divided into a number of modules. Each module is a subprogram. 8. Data abstraction property is not supported by procedure oriented language. 9. Data in procedure oriented language is open and can be accessed by any function.
  • 2. OVERVIEW OF C++ LANGUAGE: 1. C++ can be considered as an incremental version of c language which consists all programming language constructs with newly added features of object oriented programming. 2. C++ is object oriented programming language. 3. The file extension of C++ program is “.CPP” 4. Function overloading, Polymorphism, encapsulation, inheritance and operator overloading are possible. 5. Variables can be declared in inline i.e. when required 6. In c++ more emphasis is give on data rather than procedures. 7. Data abstraction property is supported by c++. 8. Data access is limited. It can be accessed by providing various visibility modes both for data and member functions. 9. Dynamic binding is supported by C++
  • 3. DIFFERENCE BETWEEN PROCEDURE ORIENTED PROGRAMMING (POP) & OBJECT ORIENTED PROGRAMMING (OOP)
  • 4. DIFFERENCE BETWEEN PROCEDURE ORIENTED PROGRAMMING (POP) & OBJECT ORIENTED PROGRAMMING (OOP)
  • 5. BASIC STRUCTURE OF C++ LANGUAGE: A C++ program should have one or more sections but the sequence of sections is to be followed. 1. Documentation section 2. Linking section 3. Definition section 4. Global declaration section & class declarations 5. Member function definition 6. Main function
  • 6. 1. DOCUMENTATION SECTION : 1. Document section comes first and is used to document the use of logic or reasons in your program. 2. It can be used to write the program's objective, developer and logic details. 3. The documentation is done in C++ language with /* and */ . Whatever is written between these two are called comments.
  • 7. 2. LINKING SECTION : 1. This section tells the compiler to link the certain occurrences of keywords or functions in your program to the header files specified in this section. 2. e.g. #include<iostream> using namespace std; 3. Directive causes the preprocessor to add the contents of the iostream file to the program. It contains declarations for cout and cin. 4. cout is a predefined object that represents the standard output stream. The operator << is an insertion operator, causes the string in double quotes to be displayed on the screen. 5. The identifier cin is a predefined object in C++ that corresponds to the standard input stream. The operator >> is known as extraction operator. It extracts the value from the keyboard and assigns it to the value variable on its right.
  • 8. 3. DEFINITION SECTION : 1. It is used to declare some constants and assign them some value. e.g. #define MAX 25 2. Here #define is a compiler directive which tells the compiler whenever MAX is found in the program replace it with 25.
  • 9. 4. GLOBAL DECLARATION SECTION : 1. Here the variables and class definitions which are used throughout the program (including main and other functions) are declared to make them global (i.e accessible to all parts of program). 2. A CLASS is a collection of data and functions that act or manipulate the data. The data components of a class are called data members and function components of a class are called member functions. 3. A class can also termed as a blue print or prototype that defines the variable or functions common to all objects of certain kind. 4. It is a user defined data type. 5. e.g. int i; //this declaration is done outside and before main()
  • 10. 5. SUB PROGRAM OR FUNCTION SECTION : This has all the sub programs or the functions which our program needs. void display() { cout<<”C++ is better that C”; }
  • 11. 6. MAIN FUNCTION SECTION :  It tells the compiler where to start the execution. main() { point from execution starts } main function has two sections 1. declaration section : In this the variables and their data types are declared. 2. Executable section or instruction section : This has the part of program which actually performs the task we need.

Editor's Notes

  1. The iostream header file provides functionality for input and output The std namespace contains many C++ standard library functions and objects, including those for input and output operations. in C++. Without "using namespace std," you would need to prefix every element from the standard library with std:: to indicate that it comes from the standard namespace.t and output operations in C++.
  2. Declares two variables num1 and num2 to store the two numbers. Asks the user to enter the first number and stores it in num1. Asks the user to enter the second number and stores it in num2. Calculates the sum of num1 and num2 and stores it in the variable sum. Displays the result, showing the entered numbers and their sum.