In your code you could use some improved indentation and there are some strange things. For example what is the purpose of the for loop in this portion?
Also it's been mentioned but gets is not a good function to use. What happens if I type more than 20 characters? I would use fgets.Code:for(i=count;i<=100;i++){ gets(rest1.name); break; }
Also you posted code but didn't say what is wrong. Does it not work or what?