This is my code in writing a file. The problem I have is when I input a data in "Enter Name: ", lets say I input Sarah Jessica it writes weird output in my file. This is th weird output:
My question is:
1. Why is it that my program can't accept input with space?
eg. Sarah Jessica<-it ignores string sarah
2. Whats that wierd -858993460
3. Why is it that string sarah jumps to Address?
I need some experts thoughts. Thanks a lot in advance
printf("\nTHIS IS A MINI DATABASE PROGRAM");
printf("You entered %s as name", name);
printf("You entered %i as age", age);
printf("\nYou entered %s as address:", adr);
printf("Output File opening failed.\n");