C For loop skips first iteration and bogus number from loop scanf

Let’s take a look at the problem one by one: newline Remains in stdin after No. or Persons Read printf(“\n\nEnter name: “); safer_gets(person[i].full_name, 35); /* This is the step being skipped */ It is skipped because your safer_gets() reads only to the first ‘\n’ (newline character — not a carriage-return, that is ‘\r’). However, the … Read more