C Input &Output

Screen and Keyboard together are called console. We have many functions for I/O. We can divide into two main category.

  •  Console I/O functions:-    In these functions, we receive input from keyboard and write to VDU(video display unit). We divide the console Input/Output functions into two Category.
  1. Formatted Functions :- scanf(),printf().
  2. Unformatted Functions:- getch(),getche(),getchar(),gets(),putch(),puchar(),puts().
  • File I/O functions:- These functions perform I/O operation on a floppy disk or a hard disk.

 Example :-

 

#include<stdio.h>
#include<conio.h>
void main()
{
int a=20;
int b;
char tutorial;
clrscr();
printf(“\nHello Friends\n”);
scanf(“%d”,&b);
printf(“\nThe value of B is : %d\n”,b);
printf(“The value of A :%d”,a);
getch();
}

Result:-

 

Console input-output program

 

 

C Input &Output Functions

 

Console Input-Output functions

 




Follow Us

Contact Us

tutorialworldin@yahoo.com

Back to Top