KEMBAR78
Input and output in c language c programming | PDF
Input And Output
A Presentation By Niladri Das
Course BCA
Sec B
ID 23234030461
In C
Agenda
● Introduction
● Types of input output
● scanf()
● printf()
● getchar()
● putchar()
● gets()
● puts()
● Feedback
Introduction
In C programming, for input and output, operations are
supplied as functions in the standard library ( stdio.h ).
So, we can take the data through input functions and
sends results through output functions.
Agenda
Standard Input and Output
Unformatted
Function
Formatted
Function
Input Function
scanf()
Output Function
printf()
Input Function
getch()
getche()
getchar()
gets()
Output Function
putch()
putchar()
puts()
Types Of Input Output -
Agenda
Formatted Input Function
scanf()
Purpose : Reads formatted input from standard input
Format Specifiers :
%d : Integer input.
%f : Floating-point number input.
%c : Character input.
%s : String input.
Example :
Agenda
Formatted Output Function
printf()
Purpose : Performs formatted output to standard output.
Format Specifiers :
%d : Integer input.
%f : Floating-point number input.
%c : Character input.
%s : String input.
Example :
Agenda
Unformatted Input Function
getchar()
● This function reads a character type data from standard output
● It reads one character at a time till the user presses the enter key.
Syntax :
VariableName = getchar() ;
Example :
Agenda
Unformatted Output Function
putchar()
● This function prints one character on the screen at a time, read by the
standard input.
Syntax :
putchar(VariableName);
Example :
Agenda
Unformatted Input Function
gets()
This function is used for accepting any string until enter key is pressed.
Syntax :
gets(variable name);
Example :
Agenda
Unformatted Output Function
puts()
This function prints the string or character array.
It is opposite to gets().
Syntax :
puts(variable name);
Example :
Agenda
Feedback
● WhatsApp No 8777432423
● Email ID niladridas.23@nshm.edu.in
Agenda

Input and output in c language c programming

  • 1.
    Input And Output APresentation By Niladri Das Course BCA Sec B ID 23234030461 In C
  • 2.
    Agenda ● Introduction ● Typesof input output ● scanf() ● printf() ● getchar() ● putchar() ● gets() ● puts() ● Feedback
  • 3.
    Introduction In C programming,for input and output, operations are supplied as functions in the standard library ( stdio.h ). So, we can take the data through input functions and sends results through output functions. Agenda
  • 4.
    Standard Input andOutput Unformatted Function Formatted Function Input Function scanf() Output Function printf() Input Function getch() getche() getchar() gets() Output Function putch() putchar() puts() Types Of Input Output - Agenda
  • 5.
    Formatted Input Function scanf() Purpose: Reads formatted input from standard input Format Specifiers : %d : Integer input. %f : Floating-point number input. %c : Character input. %s : String input. Example : Agenda
  • 6.
    Formatted Output Function printf() Purpose: Performs formatted output to standard output. Format Specifiers : %d : Integer input. %f : Floating-point number input. %c : Character input. %s : String input. Example : Agenda
  • 7.
    Unformatted Input Function getchar() ●This function reads a character type data from standard output ● It reads one character at a time till the user presses the enter key. Syntax : VariableName = getchar() ; Example : Agenda
  • 8.
    Unformatted Output Function putchar() ●This function prints one character on the screen at a time, read by the standard input. Syntax : putchar(VariableName); Example : Agenda
  • 9.
    Unformatted Input Function gets() Thisfunction is used for accepting any string until enter key is pressed. Syntax : gets(variable name); Example : Agenda
  • 10.
    Unformatted Output Function puts() Thisfunction prints the string or character array. It is opposite to gets(). Syntax : puts(variable name); Example : Agenda
  • 11.
    Feedback ● WhatsApp No8777432423 ● Email ID niladridas.23@nshm.edu.in Agenda