CLS is a Windows command. OnlineGDB runs on Unix based operating system. Use
Note: The compiler may reorganize your code for optimization reasons, so don't be surprised if simple programs like
printf("Type some text then hit ENTER! : ");
do not work as you would have expected. But if you uncomment those two lines, the screen will be cleared (as the printf calls cannot be optimized together anymore).