For my CVI based console applications, I generally add the following lines to the end of my programs:
while (KeyHit ()) // Purge keyboard buffer
GetKey ();
printf ("\nPress a key to finish:");
GetKey (); // Wait for user action
return 0;
This allows any screen output to be inspected before the program is allowed to finish.
JR