Indefinitely with while(1) or for(;;) loops :D
Don't forget to add a way to break the loop !
Super bad clunky way with pause length dependent on computer speed:
1 2 3
int x = 0;
while(x<SOMEBIGINT)
{x++;}
A better way involves comparing the difference between a start and end 'time()' from the time.h library. This way you can set the pause time to what you want. GetTickCount() too !
Functions that do this are called "blocking" functions. If you google that, you'll probably find something better. Unfortunately there is nothing in std that will do this (that I know of).
C on DOS had kbhit() which wrapped a BIOS call to detect a key press. You'd need the key map to work out what key was pressed correctly, so if a different region keyboard was attached, the program would have to be told somehow.
As described above, this is specific to the Hardware (PC), OS (MS-DOS) and probably compiler too (Borland C).