0% found this document useful (0 votes)
559 views

Difference BW Stdio & Conio

The document discusses the differences between the stdio.h and conio.h header files in C programming. stdio.h provides functions for standard input and output like printf() and scanf() and can be used for file or console I/O. conio.h is for console input and output and provides functions like getch() that are specific to console programs. While conio.h was commonly used in older compilers, stdio.h is considered the standard for input/output in C.

Uploaded by

Waqas Zafar
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
559 views

Difference BW Stdio & Conio

The document discusses the differences between the stdio.h and conio.h header files in C programming. stdio.h provides functions for standard input and output like printf() and scanf() and can be used for file or console I/O. conio.h is for console input and output and provides functions like getch() that are specific to console programs. While conio.h was commonly used in older compilers, stdio.h is considered the standard for input/output in C.

Uploaded by

Waqas Zafar
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

They are basically two different Header Files and hence the extension �.h�.

The
header files store different predefined functions or macro which are required to
solve different coding problems.

These header files serve different purposes:

stdio.h � It stands for standard I/O. It is basically used to access different


macros, functions to perform input and output. Most common functions include:
scanf() [used to read standard input] and printf() [ used to send formatted
output]. For more info refer to the following link: C Library <stdio.h>
conio.h � it stands for console I/O. The most commonly used function is getch()
which prompts the user to press a character and that character is not printed on
screen. To learn more refer to: conio.h

stdio.h>- Standard Input Output

It is used for the printf() and scanf(),it lets us use these functions .

<conio.h> -Console Input Output

It is used for functions like getch() .

[ Stdio.h is C header file which include the defination of function:-

printf();

scanf();

Conio.h is a C header file used mostly by MS-DOS compilers to provide console


input/output.

Note:-

In Turbo C++ it is mandatory to include conio.h

In Dev C++ it is not necessary but you have to include stdio.h

�stdio.h� is a standard for C.

�conio.h� is an ugly hack for MS-DOS & Turbo Pascal. It�s 20 years obsolete.

STDIO.H is short name of Standard Input & Output Header file while the CONIO.H
stands for Console Input & Output.Header file.

STDIO.H includes basic functions like printf() (to print on screen), scanf() (used
to take input from user) etc while CONIO.H includes functions like clrscr() (Clears
the Screen), getch() (it holds the screen until and input from keyboard is
received)

conio.h header file isn't used anymore. It was used in old Turbo C compiler which
are 16-bit and all your programs run virtually on 8086 microprocessor.

Originally Answered: What's the difference between <stdio.h> and <conio.h>?


The stdio.h is a standard C library and has got a lot of methods to take input from
the user and show an output. It can be either a file or a console.

On the other hand, conio.h is short for console input and output and is not a
standard c library. So, it only deals with console.

Answered Aug 10
Stdio. h is used as a standard input output library, i. e. all the input and output
functions like printf is defined in stdio. h

Whereas conio. h is used for console(the black dialog box) used to display the
output, without this header file we will not be able to get the console output.

You might also like