SlideShare a Scribd company logo
Presented By:
Deepshikha Haritwal
Satya Prakash Ranjan
 Introduction to preprocessors
 Various preprocessors directives
 The IOSTREAM library
 The IOMANIP library
 Preprocessors are programs that processes the
source code before actual compilation of the
program.
 The preprocessors directives always begin with a ‘#’
symbol.
 The ‘#’ symbol at beginning of statement in a c++
program indicates that it is a preprocessor directive.
 The various kinds of preprocessor directives that
preprocessor looks for are:
 Macros
 File inclusion
 Conditional compilation
 Macros are the piece of code in program which is
given a name.
 Whenever this name is encountered in the program
the compiler replaces the name with the actual piece
of code.
 #define directive is used for this purpose.
#include<iostream>
#define LIMIT 5
using namespace std;
int main()
{
for(int i=0;i<LIMIT;++i)
{
cout<<i<<“n”;
}
return 0;
}
 This type of preprocessor directive tells the compiler
to include a file in the source code program.
 There are two types of files that can be included in
the source program:
 1. Header files or Standard files
 2. User Defined files
 To include header files we write:
 #include<filename>
The <> brackets both delimit the filename and indicate that the
file is to be found in one of the standard directories of system.
 To include user defined files we write:
 #include “filename”
Filename within “ ” indicate that it is a user defined file.
 These directives helps to compile a specific portion of
the program or to skip the compilation of some
specific part of the program based on some
conditions.
 “ifdef”, “endif”, “ifndef” are some of the
preprocessing commands that helps achieving this
purpose.
 #ifdef macroname
Statement 1;
Statement 2;
.
.
.
.
#endif
• If the macroname is defined then the block of
statement will be executed otherwise compiler will
skip the execution of these statements.
 C++ I/O libraries provides an interface between the
program and the hardware devices that make up the
computer system.
 The IOSTREAM header file of c++ defines a
collection of stream classes that are capable of input,
output or both input and output.
 CIN OBJECT:
 It represents the standard input stream.
 It is used along with the extraction operator(>>)
 Example :
int a;
cin>>a;
 COUT OBJECT:
 It represents the standard output stream.
 It used along with the insertion operator(<<)
 Example :
int a=15;
cout<<“Value of a:”<<a;
 CERR OBJECT:
 It is an object of the class ostream.
 It represents the standard error stream.
 Example:
cerr<<“system being rebooted in 2 minutesn”;
• CLOG OBJECT:
• It is an object of the class ostream.
• It represents the standard logging stream.
• Example :
clog<< Username<<“has logged into system”;
 The iomanip library defines a collection of I/O
stream manipulators to modify the behavior of
insertions and extractions.
 It is a library that is used to manipulate the output of
c++ program.
 Setw(int w): it sets the field width to w.
 Setfill(char c): it sets the fill character to c.
 Setbase(int b): used to set the base field to one of the
possible values according to argument base.
 Setprecision(int d): sets the number of places of
accuracy to d.
 Scientific: displays the floating point values in
scientific notation.
 Fixed: displays the floating point values in decimal
notation
 Showpos: positive numbers are
displayed with a leading + sign.
 Showbase: octal numbers are displayed
preceded with 0 and hexadecimal
numbers are displayed preceded with
0x.
 Boolalpha: displays logical values
symbolically as true and false.
 Noboolapha : displays logical values as 0
and 1.
Preprocessor , IOSTREAM Library,IOMANIP Library

More Related Content

What's hot

Basic of java
Basic of javaBasic of java
Basic of java
Kavitha713564
 
Understanding java streams
Understanding java streamsUnderstanding java streams
Understanding java streamsShahjahan Samoon
 
Smart Migration to JDK 8
Smart Migration to JDK 8Smart Migration to JDK 8
Smart Migration to JDK 8
Geertjan Wielenga
 
File Handling and Command Line Arguments in C
File Handling and Command Line Arguments in CFile Handling and Command Line Arguments in C
File Handling and Command Line Arguments in C
Mahendra Yadav
 
Console applications IN C#
Console applications IN C#Console applications IN C#
Console applications IN C#
Sireesh K
 
L21 io streams
L21 io streamsL21 io streams
L21 io streams
teach4uin
 
Java stream
Java streamJava stream
Java stream
Arati Gadgil
 
Java Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsJava Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and Streams
Anton Keks
 
intro unix/linux 03
intro unix/linux 03intro unix/linux 03
intro unix/linux 03
duquoi
 
Java IO
Java IOJava IO
Java IO
UTSAB NEUPANE
 
Introduction to online judges
Introduction to online judgesIntroduction to online judges
Introduction to online judges
Mansi Jain
 
Dynamic Linker
Dynamic LinkerDynamic Linker
Dynamic Linker
Sanjiv Malik
 
Java Profiling
Java ProfilingJava Profiling
Java Profiling
zeroproductionincidents
 
C5 c++ development environment
C5 c++ development environmentC5 c++ development environment
C5 c++ development environmentsnchnchl
 
Java file
Java fileJava file
Java file
sonnetdp
 
Java 8 new features
Java 8 new featuresJava 8 new features
Java 8 new features
Aniket Thakur
 
IO In Java
IO In JavaIO In Java
IO In Javaparag
 
Java I/o streams
Java I/o streamsJava I/o streams
Java I/o streams
Hamid Ghorbani
 

What's hot (20)

Basic of java
Basic of javaBasic of java
Basic of java
 
Understanding java streams
Understanding java streamsUnderstanding java streams
Understanding java streams
 
Smart Migration to JDK 8
Smart Migration to JDK 8Smart Migration to JDK 8
Smart Migration to JDK 8
 
File Handling and Command Line Arguments in C
File Handling and Command Line Arguments in CFile Handling and Command Line Arguments in C
File Handling and Command Line Arguments in C
 
Console applications IN C#
Console applications IN C#Console applications IN C#
Console applications IN C#
 
Best Of Jdk 7
Best Of Jdk 7Best Of Jdk 7
Best Of Jdk 7
 
L21 io streams
L21 io streamsL21 io streams
L21 io streams
 
Java stream
Java streamJava stream
Java stream
 
Java Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsJava Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and Streams
 
32.java input-output
32.java input-output32.java input-output
32.java input-output
 
intro unix/linux 03
intro unix/linux 03intro unix/linux 03
intro unix/linux 03
 
Java IO
Java IOJava IO
Java IO
 
Introduction to online judges
Introduction to online judgesIntroduction to online judges
Introduction to online judges
 
Dynamic Linker
Dynamic LinkerDynamic Linker
Dynamic Linker
 
Java Profiling
Java ProfilingJava Profiling
Java Profiling
 
C5 c++ development environment
C5 c++ development environmentC5 c++ development environment
C5 c++ development environment
 
Java file
Java fileJava file
Java file
 
Java 8 new features
Java 8 new featuresJava 8 new features
Java 8 new features
 
IO In Java
IO In JavaIO In Java
IO In Java
 
Java I/o streams
Java I/o streamsJava I/o streams
Java I/o streams
 

Similar to Preprocessor , IOSTREAM Library,IOMANIP Library

Prog1-L1.pdf
Prog1-L1.pdfProg1-L1.pdf
Prog1-L1.pdf
valerie5142000
 
C++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWAREC++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWARE
UNIVERSITY OF ENGINEERING AND TECHNOLOGY TAXILA
 
General structure of c++
General structure of c++General structure of c++
General structure of c++
Ajay Chimmani
 
C_and_C++_notes.pdf
C_and_C++_notes.pdfC_and_C++_notes.pdf
C_and_C++_notes.pdf
Tigabu Yaya
 
C++ Constructs.pptx
C++ Constructs.pptxC++ Constructs.pptx
C++ Constructs.pptx
LakshyaChauhan21
 
Introduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to itIntroduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to it
PushkarNiroula1
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ tool
Abdullah Jan
 
OOPS using C++
OOPS using C++OOPS using C++
OOPS using C++
cpjcollege
 
basic program
basic programbasic program
basic program
NIDA HUSSAIN
 
Cpa lecture (theory) 01_
Cpa lecture (theory) 01_Cpa lecture (theory) 01_
Nitin Mishra 0301EC201039 Internship PPT.pptx
Nitin Mishra 0301EC201039 Internship PPT.pptxNitin Mishra 0301EC201039 Internship PPT.pptx
Nitin Mishra 0301EC201039 Internship PPT.pptx
shivam460694
 
C++ How to program
C++ How to programC++ How to program
C++ How to program
Mohammad Golyani
 
PreProcessorDirective.ppt
PreProcessorDirective.pptPreProcessorDirective.ppt
PreProcessorDirective.ppt
Osmania University
 
Introduction to Python.Net
Introduction to Python.NetIntroduction to Python.Net
Introduction to Python.Net
Stefan Schukat
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
marvellous2
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 Th
Aram Mohammed
 
Concisely describe the following terms 40 1. Source code 2. Object c.pdf
Concisely describe the following terms 40 1. Source code 2. Object c.pdfConcisely describe the following terms 40 1. Source code 2. Object c.pdf
Concisely describe the following terms 40 1. Source code 2. Object c.pdf
feelinggift
 

Similar to Preprocessor , IOSTREAM Library,IOMANIP Library (20)

Fp201 unit2 1
Fp201 unit2 1Fp201 unit2 1
Fp201 unit2 1
 
Prog1-L1.pdf
Prog1-L1.pdfProg1-L1.pdf
Prog1-L1.pdf
 
C++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWAREC++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWARE
 
General structure of c++
General structure of c++General structure of c++
General structure of c++
 
Workshop1
Workshop1Workshop1
Workshop1
 
C_and_C++_notes.pdf
C_and_C++_notes.pdfC_and_C++_notes.pdf
C_and_C++_notes.pdf
 
C++ Constructs.pptx
C++ Constructs.pptxC++ Constructs.pptx
C++ Constructs.pptx
 
Introduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to itIntroduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to it
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ tool
 
OOPS using C++
OOPS using C++OOPS using C++
OOPS using C++
 
basic program
basic programbasic program
basic program
 
Cpa lecture (theory) 01_
Cpa lecture (theory) 01_Cpa lecture (theory) 01_
Cpa lecture (theory) 01_
 
Nitin Mishra 0301EC201039 Internship PPT.pptx
Nitin Mishra 0301EC201039 Internship PPT.pptxNitin Mishra 0301EC201039 Internship PPT.pptx
Nitin Mishra 0301EC201039 Internship PPT.pptx
 
C++ How to program
C++ How to programC++ How to program
C++ How to program
 
PreProcessorDirective.ppt
PreProcessorDirective.pptPreProcessorDirective.ppt
PreProcessorDirective.ppt
 
Introduction to Python.Net
Introduction to Python.NetIntroduction to Python.Net
Introduction to Python.Net
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 Th
 
Preprocessor
PreprocessorPreprocessor
Preprocessor
 
Concisely describe the following terms 40 1. Source code 2. Object c.pdf
Concisely describe the following terms 40 1. Source code 2. Object c.pdfConcisely describe the following terms 40 1. Source code 2. Object c.pdf
Concisely describe the following terms 40 1. Source code 2. Object c.pdf
 

More from Meghaj Mallick

24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderings
Meghaj Mallick
 
PORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSSPORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSS
Meghaj Mallick
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
Meghaj Mallick
 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System Programming
Meghaj Mallick
 
MACRO ASSEBLER
MACRO ASSEBLERMACRO ASSEBLER
MACRO ASSEBLER
Meghaj Mallick
 
Icons, Image & Multimedia
Icons, Image & MultimediaIcons, Image & Multimedia
Icons, Image & Multimedia
Meghaj Mallick
 
Project Tracking & SPC
Project Tracking & SPCProject Tracking & SPC
Project Tracking & SPC
Meghaj Mallick
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
Meghaj Mallick
 
Routing in MANET
Routing in MANETRouting in MANET
Routing in MANET
Meghaj Mallick
 
Macro assembler
 Macro assembler Macro assembler
Macro assembler
Meghaj Mallick
 
Architecture and security in Vanet PPT
Architecture and security in Vanet PPTArchitecture and security in Vanet PPT
Architecture and security in Vanet PPT
Meghaj Mallick
 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software Engineering
Meghaj Mallick
 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data Mining
Meghaj Mallick
 
DFS & BFS in Computer Algorithm
DFS & BFS in Computer AlgorithmDFS & BFS in Computer Algorithm
DFS & BFS in Computer Algorithm
Meghaj Mallick
 
Software Development Method
Software Development MethodSoftware Development Method
Software Development Method
Meghaj Mallick
 
Secant method in Numerical & Statistical Method
Secant method in Numerical & Statistical MethodSecant method in Numerical & Statistical Method
Secant method in Numerical & Statistical Method
Meghaj Mallick
 
Motivation in Organization
Motivation in OrganizationMotivation in Organization
Motivation in Organization
Meghaj Mallick
 
Communication Skill
Communication SkillCommunication Skill
Communication Skill
Meghaj Mallick
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
Meghaj Mallick
 
Hashing In Data Structure
Hashing In Data Structure Hashing In Data Structure
Hashing In Data Structure
Meghaj Mallick
 

More from Meghaj Mallick (20)

24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderings
 
PORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSSPORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSS
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System Programming
 
MACRO ASSEBLER
MACRO ASSEBLERMACRO ASSEBLER
MACRO ASSEBLER
 
Icons, Image & Multimedia
Icons, Image & MultimediaIcons, Image & Multimedia
Icons, Image & Multimedia
 
Project Tracking & SPC
Project Tracking & SPCProject Tracking & SPC
Project Tracking & SPC
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
 
Routing in MANET
Routing in MANETRouting in MANET
Routing in MANET
 
Macro assembler
 Macro assembler Macro assembler
Macro assembler
 
Architecture and security in Vanet PPT
Architecture and security in Vanet PPTArchitecture and security in Vanet PPT
Architecture and security in Vanet PPT
 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software Engineering
 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data Mining
 
DFS & BFS in Computer Algorithm
DFS & BFS in Computer AlgorithmDFS & BFS in Computer Algorithm
DFS & BFS in Computer Algorithm
 
Software Development Method
Software Development MethodSoftware Development Method
Software Development Method
 
Secant method in Numerical & Statistical Method
Secant method in Numerical & Statistical MethodSecant method in Numerical & Statistical Method
Secant method in Numerical & Statistical Method
 
Motivation in Organization
Motivation in OrganizationMotivation in Organization
Motivation in Organization
 
Communication Skill
Communication SkillCommunication Skill
Communication Skill
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
 
Hashing In Data Structure
Hashing In Data Structure Hashing In Data Structure
Hashing In Data Structure
 

Recently uploaded

Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Access Innovations, Inc.
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
Sebastiano Panichella
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
amekonnen
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
faizulhassanfaiz1670
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
Howard Spence
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
eCommerce Institute
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Dutch Power
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
kkirkland2
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
Faculty of Medicine And Health Sciences
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Dutch Power
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
khadija278284
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Matjaž Lipuš
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
gharris9
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
gharris9
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
Frederic Leger
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Sebastiano Panichella
 
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AwangAniqkmals
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Rosie Wells
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Sebastiano Panichella
 

Recently uploaded (19)

Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
 
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
 

Preprocessor , IOSTREAM Library,IOMANIP Library

  • 2.  Introduction to preprocessors  Various preprocessors directives  The IOSTREAM library  The IOMANIP library
  • 3.  Preprocessors are programs that processes the source code before actual compilation of the program.  The preprocessors directives always begin with a ‘#’ symbol.  The ‘#’ symbol at beginning of statement in a c++ program indicates that it is a preprocessor directive.
  • 4.  The various kinds of preprocessor directives that preprocessor looks for are:  Macros  File inclusion  Conditional compilation
  • 5.  Macros are the piece of code in program which is given a name.  Whenever this name is encountered in the program the compiler replaces the name with the actual piece of code.  #define directive is used for this purpose.
  • 6. #include<iostream> #define LIMIT 5 using namespace std; int main() { for(int i=0;i<LIMIT;++i) { cout<<i<<“n”; } return 0; }
  • 7.  This type of preprocessor directive tells the compiler to include a file in the source code program.  There are two types of files that can be included in the source program:  1. Header files or Standard files  2. User Defined files
  • 8.  To include header files we write:  #include<filename> The <> brackets both delimit the filename and indicate that the file is to be found in one of the standard directories of system.  To include user defined files we write:  #include “filename” Filename within “ ” indicate that it is a user defined file.
  • 9.  These directives helps to compile a specific portion of the program or to skip the compilation of some specific part of the program based on some conditions.  “ifdef”, “endif”, “ifndef” are some of the preprocessing commands that helps achieving this purpose.
  • 10.  #ifdef macroname Statement 1; Statement 2; . . . . #endif • If the macroname is defined then the block of statement will be executed otherwise compiler will skip the execution of these statements.
  • 11.  C++ I/O libraries provides an interface between the program and the hardware devices that make up the computer system.  The IOSTREAM header file of c++ defines a collection of stream classes that are capable of input, output or both input and output.
  • 12.  CIN OBJECT:  It represents the standard input stream.  It is used along with the extraction operator(>>)  Example : int a; cin>>a;  COUT OBJECT:  It represents the standard output stream.  It used along with the insertion operator(<<)  Example : int a=15; cout<<“Value of a:”<<a;
  • 13.  CERR OBJECT:  It is an object of the class ostream.  It represents the standard error stream.  Example: cerr<<“system being rebooted in 2 minutesn”; • CLOG OBJECT: • It is an object of the class ostream. • It represents the standard logging stream. • Example : clog<< Username<<“has logged into system”;
  • 14.  The iomanip library defines a collection of I/O stream manipulators to modify the behavior of insertions and extractions.  It is a library that is used to manipulate the output of c++ program.
  • 15.  Setw(int w): it sets the field width to w.  Setfill(char c): it sets the fill character to c.  Setbase(int b): used to set the base field to one of the possible values according to argument base.  Setprecision(int d): sets the number of places of accuracy to d.  Scientific: displays the floating point values in scientific notation.  Fixed: displays the floating point values in decimal notation
  • 16.  Showpos: positive numbers are displayed with a leading + sign.  Showbase: octal numbers are displayed preceded with 0 and hexadecimal numbers are displayed preceded with 0x.  Boolalpha: displays logical values symbolically as true and false.  Noboolapha : displays logical values as 0 and 1.