Can I use header files stdio.h and conio.h in c | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Can I use header files stdio.h and conio.h in c

29th Sep 2020, 7:19 AM
Sukant Tripathy
Sukant Tripathy - avatar
3 ответов
+ 2
I ran into conio.h just a couple of days ago while reading Computing Fundamentals & C Programming 2nd ed by E Balagurusamy(2018), fortunately they were sample codes in introductory chapter, I guess I wont encounter it again in later chapters. If so then Ill just comment it out and devise a way of making the code work without using conio.h.
29th Sep 2020, 8:04 AM
Arturop
Arturop - avatar
+ 2
Arturop <conio.h> was generally used for 2 function :- 1) clrscr() - used to clear the screen of the shell ( you can easily find alternatives for this online depending on your OS) 2) getch() - used to pause the program at some point till the time user doesn't press a key. ( Alternative : use getchar() )
29th Sep 2020, 8:13 AM
Arsenic
Arsenic - avatar
+ 1
Arsenic, yes those were used in the codes, and clrscr() looked really interesting too bad it is not portable. 😅.
29th Sep 2020, 8:21 AM
Arturop
Arturop - avatar