SlideShare a Scribd company logo
1 of 11
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

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

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 

Recently uploaded (20)

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 

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.