I'm trying to write a simple menu in C.

This is my proposed code:

```
while (end == 0) {

    printf("Main menu\n");
    printf("=========\n");
    printf("1) Option 1.\n");
    printf("2) Option 2.\n");
    printf("3) Option 3.\n");
    printf("4) Option 4.\n");
    printf("0) Exit");
    printf("\n");
    printf("Choose an option: ");
    fgets(&menu_option,1,stdin);

    switch (menu_option) {
        case '0': end = 1; break;
        case '1': option1(); break;
        case '2': option2(); break;
        case '3': option3(); break;
        case '4': option4();
    }

}

```

However, when executing this code, the loop never ends. 

What's wrong?

Thank you.

EDIT: when I say "the loop never ends", I want to say that I can't write any option because the menu appears again and again.