You may want to hold the console window open with some line of code like this:

Code:
printf("\n\n\t\t\t      press enter when ready ");
i = getchar();  //hold the console window open
and put those two lines lines of code just before your return line.