Well, when we have two or more instances of the scanf() or of the gets() functions, at any level we may need to go back to a previous one at run time to edit what we entered before as we do it on any Windows Form or Webpage Form. So, how to do that in C?


Consider the following codes segment:

Code:
printf("Name: ");
scanf("%s", userName);

printf("E-Mail: ");
scanf("%s", eMail);

printf("Phone: ");
scanf("%ld", &phone);


Suppose that at run time the user has already entered a value for Name and now is entering a value for E-Mail and presses the Enter/Return key to enter a value for Phone, and then decides to go back to correct the value entered for Name or for E-Mail because it is misspelt.

So, how can we provide such a user friendly functionality in a C program?