I assume that your application runs on Windows (this is not portable for different operating systems).
GetConsoleWindow(), ShowWindow(), / . windows.h:
ShowWindow(GetConsoleWindow(), SW_MINIMIZE);
SW_MINIMIZE SW_HIDE, ( ).
, , DETACHED_PROCESS: . CreateProcess() , (, ...)
UPDATE: Windows, , , , AllocConsole:
if (AllocConsole()) {
printf("Now I can print to console...\n");
FreeConsole();
}