OnlineGDB runs on Linux server with gcc compiler tool chain. Which doesn't support conio.h and _kbhit() function. To have _kbhit() equivalent functions in gcc, you can use this implementation done by Morgan.