0
Ehy it is not working as desire ?
1 Antwort
0
getc(ch) takes a single character into ch. Not work for string input.
Use fgets() for taking a string input
Use Format specifier %f for floating values
Like this :
if(n == 1)
{
printf("Please enter your name = ");
fgets(d1.name,20,stdin); //20 max size, from stdin stream into d1.name
printf("Enter your driving licence number = ") ;
scanf("%d" , &d1.licence);
printf("Enter your Route you would like = ") ;
fgets(d1.route,20,stdin);
printf("Enter your driving experince = ") ;
scanf("%f" , &d1.experince);
}