Stdio.h (Standard Input/Output Header File) in C

stdio.h refers to standard input/output header file. It is header file in C’s standard library which contains constants, macros definitions and declarations of functions. It includes types used for various standard input and output operations.

The functions which are declared in stdio.h are very popular.

Member Functions :

Some of the standard member functions of stdio.h header files are,
__________________________________________________________
Function Name	Description
__________________________________________________________
scanf -		used to take input from the standard input 
		stream
gets -		read characters from stdin while a new line 
		is inserted
printf -	prints to the standard output stream
putc -		writes and returns a character to a stream
putchar -	It works as same of putc(stdout)
puts -		outputs a character string to stdout
fopen -		Opens a file to read or write
fwrite -	writes data to a file
fputs -		writes a string to a file
fread -		reads data from a file
fseek -		seeks file
fclose -	Closes a file
remove -	deletes or removes a file
rename -	renames a file
rewind -	adjusts the specified file so that the next
		I/O operation will take place at the 
		beginning of the file. "rewind" is 
		equivalent to fseek(f,0L,SEEK_SET);
__________________________________________________________

Program :

/*  Program to demonstrate stdio.h header file working.
Creation Date : 06 Nov 2010 03:21:00 AM
Author : www.technoexam.com [Technowell, Sangli] */

#include <stdio.h>
#include <conio.h>

int main(void)
{
	int no;
	clrscr();
	printf("\n\t Enter any number : ");
	scanf("%d",&no); // scanf()
	printf("\n\n\t Number is : %d",no); // printf()
	getch();
	return 0;
}

Output :

Enter any number : 122

Leave A Comment

Your email address will not be published. Required fields are marked *