The majority of the code is an example from a previous issue on this website but it is irrelevant to my problem (I think). I'm running this program on Windows and want to the program to pause at EOF so I can see everything that has been printed in the command screen rather than it disappearing immediately. Why does printf("Press ENTER key to Continue\n");  getchar(); not pause the command screen when the program ends? (Note system("pause"); works but I know it's only used for Windows which I don't want even though I'm currently on Windows.)
int main() {
    char Password[30];
    char User[5][30];
    int i;
    //char endfile;
    for (i = 0; i < 5; i++) {
        printf("Enter Password");
        scanf("%s", Password);
        strcpy(User[i], Password);
    }
    for (i = 0; i < 5; i++)
        printf("Password %d: %s\n", i + 1, User[i]);
    printf("Press ENTER key to Continue\n");
    //endfile = getchar();  //this did not work either when I tried it
    getchar();
    return 0;
}
 
    