SlideShare a Scribd company logo
- - --::::-..
D So, we need some methods that can
read input and write output on a
suitable input/output medium.
D Most
input
programs take some data as
and display the processed data
or result as output.
D Reading, processing and writing of
data are three essential functionsof a
computer program.
----------
-- .. -.--
contains an alphabet; otherwise it
assumes O(FALSE) . Similar for
isdigit function.
zero(TRUE) if the argument character
D isalpha function assumes a value non-
-----=-----_------
-- -- -
D w here variable_name is a type cha
r variable containing a character.
This sta tement displays
the character contained
in the
variable name at the terminal.
0
/o, a data type character(or type
D The field (or forma t) specifica
tions, consisting of the conv
ersion cha racter
specifier), and an optional
number, specifying the field w
idth.
0
I nputtingI nteger Numbers
D The field specification for reading an
integer number is:
/owd
D w is an integer number that specifies
the field width of the number to be
read and d, known as data type
character.
------
D On the other way if we have written _: ·-
- - --
Scanf("0
/od0
/od",&num1,&num2);
Will read the data 31426 50
Correctly in num1, num2.
D Input data items must be separated by
spaces,tabs or new lines.
D When the scanf reads a particular value,
reading of the value will terminate as soon
as the number of characters specified by
the field width is reached(if specified) or
until a character that is not valid for the
value being read is encountered.
0 0 0
0
DAn input field may be skipped by specifying
* in the place of field width.
For example,
Scant (/od /o*d /od",&a,&b);
Input: 123 456
789
123
456 789
a skipped b
The data character d may bepreceded
by 'I' to read long integers.( /old)
0 0
0
- - - - - -
DThe specifica tions for reading cha
racter strings are:
/ows or /owc
0°
/owc used to read a single
character w hile /ows
termina tes the reading at the
encounter of blank space.
Input Output Function in C by Sulav Acharya
Input Output Function in C by Sulav Acharya
Input Output Function in C by Sulav Acharya
Input Output Function in C by Sulav Acharya
Input Output Function in C by Sulav Acharya

More Related Content

Similar to Input Output Function in C by Sulav Acharya

Sap script system_symbol
Sap script system_symbolSap script system_symbol
Sap script system_symbol
moderngladiator
 
Lecture 15_Strings and Dynamic Memory Allocation.pptx
Lecture 15_Strings and  Dynamic Memory Allocation.pptxLecture 15_Strings and  Dynamic Memory Allocation.pptx
Lecture 15_Strings and Dynamic Memory Allocation.pptx
JawadTanvir
 

Similar to Input Output Function in C by Sulav Acharya (20)

2 data and c
2 data and c2 data and c
2 data and c
 
Sap script system_symbol
Sap script system_symbolSap script system_symbol
Sap script system_symbol
 
R Text-Based Data I/O and Data Frame Access and Manupulation
R Text-Based Data I/O and Data Frame Access and ManupulationR Text-Based Data I/O and Data Frame Access and Manupulation
R Text-Based Data I/O and Data Frame Access and Manupulation
 
programming fortran 77 Slide02
programming fortran 77 Slide02programming fortran 77 Slide02
programming fortran 77 Slide02
 
Unit 2
Unit 2Unit 2
Unit 2
 
Debug(1).ppt
Debug(1).pptDebug(1).ppt
Debug(1).ppt
 
C Programming Unit-3
C Programming Unit-3C Programming Unit-3
C Programming Unit-3
 
Lecture 15_Strings and Dynamic Memory Allocation.pptx
Lecture 15_Strings and  Dynamic Memory Allocation.pptxLecture 15_Strings and  Dynamic Memory Allocation.pptx
Lecture 15_Strings and Dynamic Memory Allocation.pptx
 
C programming language
C programming languageC programming language
C programming language
 
Data type in c
Data type in cData type in c
Data type in c
 
Tut1
Tut1Tut1
Tut1
 
C language first program
C language first programC language first program
C language first program
 
String notes
String notesString notes
String notes
 
012. SQL.pdf
012. SQL.pdf012. SQL.pdf
012. SQL.pdf
 
VHDL- data types
VHDL- data typesVHDL- data types
VHDL- data types
 
Lecture 05 2017
Lecture 05 2017Lecture 05 2017
Lecture 05 2017
 
Token and operators
Token and operatorsToken and operators
Token and operators
 
Basic of c &c++
Basic of c &c++Basic of c &c++
Basic of c &c++
 
Ui disk & terminal drivers
Ui disk & terminal driversUi disk & terminal drivers
Ui disk & terminal drivers
 
C++
C++C++
C++
 

More from AchSulav

Unit 9 Technological trends in Information Technology By Sulav Acharya
Unit 9 Technological trends in Information Technology By Sulav AcharyaUnit 9 Technological trends in Information Technology By Sulav Acharya
Unit 9 Technological trends in Information Technology By Sulav Acharya
AchSulav
 
Idea Presentation - Slide Template By Sulav.pptx
Idea Presentation - Slide Template By Sulav.pptxIdea Presentation - Slide Template By Sulav.pptx
Idea Presentation - Slide Template By Sulav.pptx
AchSulav
 
Computer Hardware and It's Components By Sulav Acharya
Computer Hardware and It's Components By Sulav AcharyaComputer Hardware and It's Components By Sulav Acharya
Computer Hardware and It's Components By Sulav Acharya
AchSulav
 
Informations Security and It's Consequence By Sulav Acharya
Informations Security and It's Consequence By Sulav AcharyaInformations Security and It's Consequence By Sulav Acharya
Informations Security and It's Consequence By Sulav Acharya
AchSulav
 
Computer Software and It's Components by Sulav Acharya
Computer Software and It's Components by Sulav AcharyaComputer Software and It's Components by Sulav Acharya
Computer Software and It's Components by Sulav Acharya
AchSulav
 
Unit 2 Basic Computer Organization and Computer Peripherals By Sulav Acharya
Unit 2 Basic Computer Organization and Computer Peripherals By Sulav AcharyaUnit 2 Basic Computer Organization and Computer Peripherals By Sulav Acharya
Unit 2 Basic Computer Organization and Computer Peripherals By Sulav Acharya
AchSulav
 
Unit 9 Technological trends in Information Technology By Sulav Acharya
Unit 9 Technological trends in Information Technology By Sulav AcharyaUnit 9 Technological trends in Information Technology By Sulav Acharya
Unit 9 Technological trends in Information Technology By Sulav Acharya
AchSulav
 

More from AchSulav (12)

Domains and competencies of EI by Sulav Acharya
Domains and competencies of EI by Sulav AcharyaDomains and competencies of EI by Sulav Acharya
Domains and competencies of EI by Sulav Acharya
 
Unit 9 Technological trends in Information Technology By Sulav Acharya
Unit 9 Technological trends in Information Technology By Sulav AcharyaUnit 9 Technological trends in Information Technology By Sulav Acharya
Unit 9 Technological trends in Information Technology By Sulav Acharya
 
Idea Presentation - Slide Template By Sulav.pptx
Idea Presentation - Slide Template By Sulav.pptxIdea Presentation - Slide Template By Sulav.pptx
Idea Presentation - Slide Template By Sulav.pptx
 
Computer Hardware and It's Components By Sulav Acharya
Computer Hardware and It's Components By Sulav AcharyaComputer Hardware and It's Components By Sulav Acharya
Computer Hardware and It's Components By Sulav Acharya
 
Informations Security and It's Consequence By Sulav Acharya
Informations Security and It's Consequence By Sulav AcharyaInformations Security and It's Consequence By Sulav Acharya
Informations Security and It's Consequence By Sulav Acharya
 
Computer Software and It's Components by Sulav Acharya
Computer Software and It's Components by Sulav AcharyaComputer Software and It's Components by Sulav Acharya
Computer Software and It's Components by Sulav Acharya
 
Unit 2 Basic Computer Organization and Computer Peripherals By Sulav Acharya
Unit 2 Basic Computer Organization and Computer Peripherals By Sulav AcharyaUnit 2 Basic Computer Organization and Computer Peripherals By Sulav Acharya
Unit 2 Basic Computer Organization and Computer Peripherals By Sulav Acharya
 
Introduction to Computer By Sulav Acharya
Introduction to Computer By Sulav AcharyaIntroduction to Computer By Sulav Acharya
Introduction to Computer By Sulav Acharya
 
Unit 9 Technological trends in Information Technology By Sulav Acharya
Unit 9 Technological trends in Information Technology By Sulav AcharyaUnit 9 Technological trends in Information Technology By Sulav Acharya
Unit 9 Technological trends in Information Technology By Sulav Acharya
 
Social presentation in Role of Technical Communication by Sulav Acharya
Social presentation in Role of Technical Communication  by Sulav AcharyaSocial presentation in Role of Technical Communication  by Sulav Acharya
Social presentation in Role of Technical Communication by Sulav Acharya
 
Recent New Trends in Technology By Sulav Acharya
Recent New Trends in Technology By Sulav AcharyaRecent New Trends in Technology By Sulav Acharya
Recent New Trends in Technology By Sulav Acharya
 
Trending Technology by Sulav And MD Aziz
Trending Technology by Sulav And MD AzizTrending Technology by Sulav And MD Aziz
Trending Technology by Sulav And MD Aziz
 

Recently uploaded

Heuristic Evaluation of System & Application
Heuristic Evaluation of System & ApplicationHeuristic Evaluation of System & Application
Heuristic Evaluation of System & Application
Jaime Brown
 
National-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptxNational-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptx
AlecAnidul
 
Research about Venice ppt for grade 6f anas
Research about Venice ppt for grade 6f anasResearch about Venice ppt for grade 6f anas
Research about Venice ppt for grade 6f anas
anasabutalha2013
 

Recently uploaded (14)

The Evolution of Fashion Trends: History to Fashion
The Evolution of Fashion Trends: History to FashionThe Evolution of Fashion Trends: History to Fashion
The Evolution of Fashion Trends: History to Fashion
 
Spring 2024 wkrm_Enhancing Campus Mobility.pdf
Spring 2024 wkrm_Enhancing Campus Mobility.pdfSpring 2024 wkrm_Enhancing Campus Mobility.pdf
Spring 2024 wkrm_Enhancing Campus Mobility.pdf
 
Heuristic Evaluation of System & Application
Heuristic Evaluation of System & ApplicationHeuristic Evaluation of System & Application
Heuristic Evaluation of System & Application
 
Design lessons from Singapore | Volume 3
Design lessons from Singapore | Volume 3Design lessons from Singapore | Volume 3
Design lessons from Singapore | Volume 3
 
Art Nouveau Movement Presentation for Art History.
Art Nouveau Movement Presentation for Art History.Art Nouveau Movement Presentation for Art History.
Art Nouveau Movement Presentation for Art History.
 
Claire's designing portfolio presentation
Claire's designing portfolio presentationClaire's designing portfolio presentation
Claire's designing portfolio presentation
 
National-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptxNational-Learning-Camp 2024 deped....pptx
National-Learning-Camp 2024 deped....pptx
 
Pitch Presentation for Service Design in Technology
Pitch Presentation for Service Design in TechnologyPitch Presentation for Service Design in Technology
Pitch Presentation for Service Design in Technology
 
BIT- Pinal .H. Prajapati Graphic Designer
BIT- Pinal .H. Prajapati  Graphic DesignerBIT- Pinal .H. Prajapati  Graphic Designer
BIT- Pinal .H. Prajapati Graphic Designer
 
The Design Code Google Developer Student Club.pptx
The Design Code Google Developer Student Club.pptxThe Design Code Google Developer Student Club.pptx
The Design Code Google Developer Student Club.pptx
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
 
Research about Venice ppt for grade 6f anas
Research about Venice ppt for grade 6f anasResearch about Venice ppt for grade 6f anas
Research about Venice ppt for grade 6f anas
 
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdfPORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
PORTFOLIO FABIANA VILLANI ARCHITECTURE.pdf
 
CA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdfCA OFFICE office office office _VIEWS.pdf
CA OFFICE office office office _VIEWS.pdf
 

Input Output Function in C by Sulav Acharya

  • 1. - - --::::-.. D So, we need some methods that can read input and write output on a suitable input/output medium. D Most input programs take some data as and display the processed data or result as output. D Reading, processing and writing of data are three essential functionsof a computer program.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. ---------- -- .. -.-- contains an alphabet; otherwise it assumes O(FALSE) . Similar for isdigit function. zero(TRUE) if the argument character D isalpha function assumes a value non-
  • 11.
  • 12.
  • 13. -----=-----_------ -- -- - D w here variable_name is a type cha r variable containing a character. This sta tement displays the character contained in the variable name at the terminal.
  • 14.
  • 15.
  • 16.
  • 17. 0 /o, a data type character(or type D The field (or forma t) specifica tions, consisting of the conv ersion cha racter specifier), and an optional number, specifying the field w idth.
  • 18. 0 I nputtingI nteger Numbers D The field specification for reading an integer number is: /owd D w is an integer number that specifies the field width of the number to be read and d, known as data type character.
  • 19.
  • 20.
  • 21. ------ D On the other way if we have written _: ·- - - -- Scanf("0 /od0 /od",&num1,&num2); Will read the data 31426 50 Correctly in num1, num2. D Input data items must be separated by spaces,tabs or new lines. D When the scanf reads a particular value, reading of the value will terminate as soon as the number of characters specified by the field width is reached(if specified) or until a character that is not valid for the value being read is encountered.
  • 22. 0 0 0 0 DAn input field may be skipped by specifying * in the place of field width. For example, Scant (/od /o*d /od",&a,&b); Input: 123 456 789 123 456 789 a skipped b The data character d may bepreceded by 'I' to read long integers.( /old)
  • 23.
  • 24.
  • 25. 0 0 0 - - - - - - DThe specifica tions for reading cha racter strings are: /ows or /owc 0° /owc used to read a single character w hile /ows termina tes the reading at the encounter of blank space.