#include <stdio.h>
int main()
{
printf("whatever");
system("pause>nul");
return 0;
}
I usually use a system pause>nul. This will leave the CMD window open without requesting any user input. But I'm a newbie, so forgive me if I'm wrong. But I'm not sure if it works in C, since I've been learning C++ with MS Visual Studio 2010 Pro.
Reading online, this doesn't look like it's meant to be standard practice, soooo... take it for what it's worth. It gets the job done, but there has to be a better way.