Hi
I want to take three inputs from user. First one is of integer, second one is a word and third one is a sentence. The problem is when i am taking third input it is taking only first word of the line.How i can take entire line as input. I am using following code
Code:
while(another=='Y')
{
printf("\n Enter schedule id,schedule name and schedule description\n");
scanf("%d %s %31s",&schinf.sch_id,schinf.sch_name,schinf.sch_dsc);
fwrite(&schinf,sizeof(schinf),1,fp);
printf("\nWould you like to enter another record?\n");
while((another=getchar())!='\n');
another=getchar();
}
Thnaks in advance
Sas