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.
Ad

More Related Content

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

presentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C languagepresentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C language
GautamGupta136
 
Programming In C- (1)jhgjhgjhgjhghj.docx
Programming In C- (1)jhgjhgjhgjhghj.docxProgramming In C- (1)jhgjhgjhgjhghj.docx
Programming In C- (1)jhgjhgjhgjhghj.docx
Dpak Chavan
 
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
 
C tutorials
C tutorialsC tutorials
C tutorials
sujit11feb
 
PPs16.pptx
PPs16.pptxPPs16.pptx
PPs16.pptx
Vamshi171
 
Exhibit design and programming skills to build and automate business solution...
Exhibit design and programming skills to build and automate business solution...Exhibit design and programming skills to build and automate business solution...
Exhibit design and programming skills to build and automate business solution...
sramani6
 
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
 
Programming in c
Programming in cProgramming in c
Programming in c
ankitjain851
 
presentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C languagepresentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C language
GautamGupta136
 
Programming In C- (1)jhgjhgjhgjhghj.docx
Programming In C- (1)jhgjhgjhgjhghj.docxProgramming In C- (1)jhgjhgjhgjhghj.docx
Programming In C- (1)jhgjhgjhgjhghj.docx
Dpak Chavan
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
Mugilvannan11
 
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
 
Exhibit design and programming skills to build and automate business solution...
Exhibit design and programming skills to build and automate business solution...Exhibit design and programming skills to build and automate business solution...
Exhibit design and programming skills to build and automate business solution...
sramani6
 
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
 

Recently uploaded (20)

Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Journal of Soft Computing in Civil Engineering
 
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
AI Publications
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdfML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
rameshwarchintamani
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic AlgorithmDesign Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Journal of Soft Computing in Civil Engineering
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Evonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdfEvonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdf
szhang13
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
Reflections on Morality, Philosophy, and History
 
Working with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to ImplementationWorking with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to Implementation
Alabama Transportation Assistance Program
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
AI Publications
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdfML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
rameshwarchintamani
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Evonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdfEvonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdf
szhang13
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Ad

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

  • #8: 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++.
  • #12: 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.
  翻译: