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.
Here is another conio package:- GitHub - zoelabbb/conio.h: This is a library conio.h for linux ️. you can install manual library conio.h for linux step by step here.- GitHub - thradams/conio: Turbo C conio.h clone for windows and linux- GitHub - nowres/conio-for-linux: Conio.h for linux