When this function is run it skips the fgets and goes straight onto the stop() function.Code:void create_entry() { fgets(a.fname, 51, stdin); printf("%s", a.fname); stop(); }
But using the same three lines in int main() it works. How can i slove this?