DIGIT-ARC read-only archive · snapshot: July 23, 2026

Using both conio and stdio

7 posts · originally from https://geek.digit.in/community/threads/using-both-conio-and-stdio.169294/

T
The Conqueror Original post #1
Jan 23, 2013 at 9:01 PM
Well, I'm pursuing computer engineering. Unfortunately, at our college we use the decade old Turbo C Compiler. Add to the misery, the professor insists on using both stdio.h and conio.h standard libraries. I did some research and found that the stdio.h library has all the prototypes and functions for scanf,printf etc so is it really necessary to use both conio and stdio libraries?
RBX
RBX #2
Jan 24, 2013 at 10:40 AM
Well, I'm pursuing computer engineering. Unfortunately, at our college we use the decade old Turbo C Compiler. Add to the misery, the professor insists on using both stdio.h and conio.h standard libraries. I did some research and found that the stdio.h library has all the prototypes and functions for scanf,printf etc so is it really necessary to use both conio and stdio libraries?

No, just stdio.h will do. You can show output after execution in the output tab (shortcut key F5, maybe).
krishnandu.sarkar
Jan 24, 2013 at 11:45 AM
I guess you have to use both. As they are using Turbo C, conio.h is needed for getch(); function. Otherwise the output window will just come and close within few sec. Users won't be able to view the output. So getch() = get a char from keyboard, holds the screen until it gets a char, so users can view the output.
T
The Conqueror #4
Jan 24, 2013 at 6:45 PM
Thank you for the replies. :)
ShankJ
ShankJ #5
Jan 24, 2013 at 6:57 PM
well i guess you'l have to use both as conio.h is needed for getch() and clrscr()[required for cleaning the output screen after every execution]..
tkin
tkin #7
Jan 27, 2013 at 1:59 AM
Both are needed, well, we used linux exclusively in our college and we didn't need the getch(), so no conio needed, but on wiindows you need it to keep the console open as it waits for a key input for you before closing(here comes the getch), else it will close after the run and you won't be able to see the output.