I had the following code and the yes no functionality won't work.
printf("\nDo you wish to add more records? [y/n] ");
scanf("%c", &choice);
printf("\nYour choice: %c\n", choice);
if (choice != 'y')
{
printf("Making choice false.");
addMore = false;
}
So, according to stackoverflow answer, just adding a space in scanf will solve the problem.
scanf(" %c", &choice);
^