C: Do-While Loop Repeating Too Much!
I have a small program that which is confusing me. I am trying using a loop to take input from user. In case input is wrong, it is repeated again but if it is right, it exits. The code snippet is: void main() { char user_status; // Checks User Status q = Quiz Master and p = Participant int valid_status = '0'; // Checks If User Status Is Valid Or Not. Used In Some Loops. 0 = Invalid, 1 = Invalid. printf("Welcome to General Knowledge Quiz Management System.\nThis application has been designed to help you conduct a quiz or test your GK."); do { user_status = '0'; printf("\n\nPlease enter your