CrazyEngineers Archive
Old, but evergreen and popular discussions on CrazyEngineers, presented to you in read-only mode.
@Akhil Vijay • 09 Sep, 2015
Can anyone please let me know the difference between stdio.h & conio.h and where & when these header files should be used?
@PROSENJIT • 09 Sep, 2015 • 1 like
Akhil Vijay
Can anyone please let me know the difference between stdio.h & conio.h and where & when these header files should be used?
You write [HASHTAG]#include[/HASHTAG]<stdio.h> and [HASHTAG]#include[/HASHTAG]<conio.h> in a C or C++ program to "include" the files "stdio.h" or "conio.h" into your program. It's the same as opening those files in an editor, and copy/pasting them into your program at the point where the [HASHTAG]#include[/HASHTAG] statement is.
<stdio.h> contain some functions prototypes like printf(), scanf(), cout,cin.
<conio.h> contain some functions prototypes like clrscr(), getch(), getche() etc.
To find these files, look in the compiler's install directory, in the lib sub-directory. Just don't change anything in these directories, because they are a part of the compiler and run-time library. 😀
@Akhil Vijay • 10 Sep, 2015
PROSENJIT
You write [HASHTAG]#include[/HASHTAG]<stdio.h> and [HASHTAG]#include[/HASHTAG]<conio.h> in a C or C++ program to "include" the files "stdio.h" or "conio.h" into your program. It's the same as opening those files in an editor, and copy/pasting them into your program at the point where the [HASHTAG]#include[/HASHTAG] statement is.
<stdio.h> contain some functions prototypes like printf(), scanf(), cout,cin.
<conio.h> contain some functions prototypes like clrscr(), getch(), getche() etc.
To find these files, look in the compiler's install directory, in the lib sub-directory. Just don't change anything in these directories, because they are a part of the compiler and run-time library. 😀
Thank you very much. Is it necessary to use both the header files in every program that we do?
@Sanyam Khurana • 10 Sep, 2015
Akhil Vijay
Can anyone please let me know the difference between stdio.h & conio.h and where & when these header files should be used?
STDIO means Standard Input Output. It has some pre-defined functions like int printf(), scanf() etc. CONIO stands for Console Input Output which has some functions like clrscr(), getch() etc.

Akhil Vijay
Thank you very much. Is it necessary to use both the header files in every program that we do?
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. So, if you understand how the memory is divided in 8086, you will un-leash must of the logic C uses internally.

Do not use Turbo C, use gcc or something that uses wrapper to gcc like CodeBlocks IDE.

Also, your header files should not be placed like:
[HASHTAG]#include[/HASHTAG]<stdio.h>
[HASHTAG]#include[/HASHTAG]<conio.h>

// rest of the program

The proper way to do this would be:

[HASHTAG]#include[/HASHTAG]<stdio>

using namespace std;

// rest of the program.

I hope this would be a good pointer for you.
@Akhil Vijay • 10 Sep, 2015 • 1 like
Sanyam Khurana
STDIO means Standard Input Output. It has some pre-defined functions like int printf(), scanf() etc. CONIO stands for Console Input Output which has some functions like clrscr(), getch() etc.


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. So, if you understand how the memory is divided in 8086, you will un-leash must of the logic C uses internally.

Do not use Turbo C, use gcc or something that uses wrapper to gcc like CodeBlocks IDE.

Also, your header files should not be placed like:
[HASHTAG]#include[/HASHTAG]<stdio.h>
[HASHTAG]#include[/HASHTAG]<conio.h>

// rest of the program

The proper way to do this would be:

[HASHTAG]#include[/HASHTAG]<stdio>

using namespace std;

// rest of the program.

I hope this would be a good pointer for you.
Sanyam Khurana
STDIO means Standard Input Output. It has some pre-defined functions like int printf(), scanf() etc. CONIO stands for Console Input Output which has some functions like clrscr(), getch() etc.


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. So, if you understand how the memory is divided in 8086, you will un-leash must of the logic C uses internally.

Do not use Turbo C, use gcc or something that uses wrapper to gcc like CodeBlocks IDE.

Also, your header files should not be placed like:
[HASHTAG]#include[/HASHTAG]<stdio.h>
[HASHTAG]#include[/HASHTAG]<conio.h>

// rest of the program

The proper way to do this would be:

[HASHTAG]#include[/HASHTAG]<stdio>

using namespace std;

// rest of the program.

I hope this would be a good pointer for you.
Thank you very much for the info.
@pratap singh, upendra • 10 Sep, 2015
Sanyam Khurana
STDIO means Standard Input Output. It has some pre-defined functions like int printf(), scanf() etc. CONIO stands for Console Input Output which has some functions like clrscr(), getch() etc.
Could you please shed some light on the difference between Standard Input Output and Console Input Output?
Just give the striking difference between them. Technical details are not required as of now.
@pratap singh, upendra • 10 Sep, 2015
PROSENJIT
To find these files, look in the compiler's install directory, in the lib sub-directory. Just don't change anything in these directories, because they are a part of the compiler and run-time library
Are header files really a part of compiler?

As per my knowledge, they are a part of run-time library where the developers have written codes that could be used by the programmers instead of reinventing the wheel.
Correct me if I am wrong...
@Suresh Babu • 23 Jan, 2017 stdio.h is part of c language standard library header. conio.h is an additional library header file provided by BORLAND TURBO C. There are some common functions between these two libraries.
@rajmanisha • 08 Jul, 2017 stdio.h is the header of c programming language which means Standard input output. It has pre-defined functions like int printf(), scanf() etc. conio.h is Console Input Output which include functions like clrscr(), getch() etc.
@Chebet Sarah • 22 Jan, 2020 • 1 like

To start with conio.h header file is deprecated. It was used in old 16-bit compilers running on an 8086 microprocesser. Conio.h stands for Console Input & Output.Header file. It includes functions like khbit(), cgets(), cscanf(), putch(), cputs(), cprintf(), clrscr(), and getch().

Stdio.h is short name of Standard Input & Output Header file. It is basically used to access different macros, functions to perform input and output. stdio.h includes basic functions such as printf, scanf, getc(), gets(), getchar(), puts(), putchar(), clearerr(), fopen(), fclose(), getw(), putw(), fgetc(), putc().

 

 

@Durgesh Srivastava • 22 Jan, 2020

Stdio.h- It stands for standard input and output header file. It has definitions of functions like printf() and scanf(). It takes and input from user and displays output either in a file or console. 

Conio.h- It stands for console input and output. It also does the same as for stdio.h but operates only via console, includes functions like clrscr() (Clears the Screen), getch() (it holds the screen until and input from keyboard is received) 


@Vinay Mishra • 22 Jan, 2020 • 1 like

Stdio.h-  It stands for the standard I/O header file. It contains definitions of functions like printf(), scanf(). It works to take input and give output either in a file or in the console.

Conio.h- It stands for the console I/O header file. It contains definitions of functions same as stdio.h but only can be operated by the console. It is used in the software like TURBO C, and DOS.

@Mohana Chandra • 22 Jan, 2020 • 4 likes

Header files are also known as preprocessor directives.

Stdio.h : Standard Input Output header file,which provides a large number of library functions. Most widely used are,printf(),scanf().

Printf ()  writes the character , string , float, Integer onto the output screen. Scanf () reads the input of the form character or string or numeric data from keyboard.The list also includes the following functions: 

fopen(),fclose(),gets(),puts(),getc(), getchar()fflush () etc.

Conio.h: console input and output header file,which provides  the following library functions: 

putch () - writes character to console.

getch () - gets character from console.

cprintf () - writes to console.

cscanf () - reads from console.

cgets() - gets string from console.

clrscr () - clears the screen.



@Kavya Burramolla • 24 Jan, 2020 • 4 likes

We know stdio.h is a standard input output header and conio.h is a console header. Both are the pre processor directives and the main difference comes with the functions used in it and the output it results.

stdio.h header supports the input output operations with library functions like printf(), Scanf(), fopen(), fclose() etc., and the output can be seen either in the output file or the console window. 

Whereas conio.h header is for console input and output operations. It has functions like cprintf(), cscanf(), getch() etc., that is solely for console window operations.

@Karshil Sheth • 24 Jan, 2020 • 2 likes

stdio.h - Standard input and Output header file. It has definitions of functions like printf() and scanf(). It takes and input from user and displays output either in a file or console.

conio.h - Console input and output. It also does the same as stdio.h but operates only via console. It was used earlier in Turbo C & DOS and has become obsolete now a days.

@Teja Reddy • 25 Feb, 2020

stdio.h - Standard input and Output header file. It has definitions of functions like printf() and scanf(). It takes and input from user and displays output either in a file or console.


conio.h - Console input and output. It also does the same as stdio.h but operates only via console. It was used earlier in Turbo C & DOS and has become obsolete now a days.

@Dzidzi Dieudonne43 • 21 Jul, 2020 • 1 like

Both  studio.h and conio.h are header files, studio.h  stands for standard input and output header file, it's allows the program to hold scanf() & printf() in C language and cin & cout  in C++ language whereas coion.h  stands for console input and output and allows the clrscr() and getch() this header file is common used in old microprocessor with 8086 and C compiler with 16-bit.

Related Posts

@surendhran · Mar 10, 2015

Project Abstract / Summary : ABSTRACT This project “EL-BOW TRANSMISSION” being compact and portable equipment, which is skilful and is having practice in transmitting power at right angle without any...

@Ankita Katdare · Jun 3, 2013

Samsung Electronics Corp. has today launched a new tablet called the Samsung Galaxy Tab 3, the successor to its early Galaxy Tab 2, to be made available globally starting this...

@friendster7 · Mar 24, 2008

check out this site it is cool guys!! string spin toy - zefrank.com

@Kaustubh Katdare · Dec 10, 2014

CEans, Few weeks ago, we decided to design and launch the CrazyEngineers T-Shirts and were first two batches were sold out in just few days. A lot of you asked...