Using both conio and stdio

Status
Not open for further replies.
T

The Conqueror

Guest
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

In the zone
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

Simply a DIGITian
Staff member
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.
 

ShankJ

Been There, Done That!!
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

Back to school!!
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.
 
Status
Not open for further replies.
Top Bottom