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

PPTX
Principles of object oriented programing
PDF
C++ Programming with examples for B.Tech
PPTX
OODP Unit 1 OOPs classes and objects
PPTX
Introduction to C++ Programming
PDF
OODPunit1.pdf
PPTX
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
PPTX
c++.pptxwjwjsijsnsksomammaoansnksooskskk
Principles of object oriented programing
C++ Programming with examples for B.Tech
OODP Unit 1 OOPs classes and objects
Introduction to C++ Programming
OODPunit1.pdf
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
c++.pptxwjwjsijsnsksomammaoansnksooskskk

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

PPTX
OOP CHAPTER object oreinted programming using c++
PDF
Opps concept
PDF
Introduction To C++ programming and its basic concepts
PPT
C++ - A powerful and system level language
PPT
lecture02-cpp.ppt
PPT
PPTX
Lecture 1.pptx
PPT
c++ ppt.ppt
PDF
Object Oriented Programming using C++ - Part 1
PPTX
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
PPT
Introduction to Inheritance in C plus plus
PPT
lecture5-cpp.pptintroduccionaC++basicoye
PDF
C++
PPTX
Oop in c++ lecture 1
PPT
lecture02-cpp.ppt
PPT
lecture02-cpp.ppt
PPT
lecture02-cpp.ppt
PPT
lecture02-cpp.ppt
PPTX
UNIT - 1- Ood ddnwkjfnewcsdkjnjkfnskfn.pptx
PPT
443600107-1-Introduction-to-C-ppt (1).ppt
OOP CHAPTER object oreinted programming using c++
Opps concept
Introduction To C++ programming and its basic concepts
C++ - A powerful and system level language
lecture02-cpp.ppt
Lecture 1.pptx
c++ ppt.ppt
Object Oriented Programming using C++ - Part 1
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
Introduction to Inheritance in C plus plus
lecture5-cpp.pptintroduccionaC++basicoye
C++
Oop in c++ lecture 1
lecture02-cpp.ppt
lecture02-cpp.ppt
lecture02-cpp.ppt
lecture02-cpp.ppt
UNIT - 1- Ood ddnwkjfnewcsdkjnjkfnskfn.pptx
443600107-1-Introduction-to-C-ppt (1).ppt
Ad

Recently uploaded (20)

PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Structs to JSON How Go Powers REST APIs.pdf
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPT
Project quality management in manufacturing
PPTX
CH1 Production IntroductoryConcepts.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
CYBER-CRIMES AND SECURITY A guide to understanding
Embodied AI: Ushering in the Next Era of Intelligent Systems
Operating System & Kernel Study Guide-1 - converted.pdf
Structs to JSON How Go Powers REST APIs.pdf
OOP with Java - Java Introduction (Basics)
Internet of Things (IOT) - A guide to understanding
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Sustainable Sites - Green Building Construction
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Arduino robotics embedded978-1-4302-3184-4.pdf
Project quality management in manufacturing
CH1 Production IntroductoryConcepts.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
additive manufacturing of ss316l using mig welding
Strings in CPP - Strings in C++ are sequences of characters used to store and...
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Model Code of Practice - Construction Work - 21102022 .pdf
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.