+ 2
I intend to names as part of my output when i input it but am getting something strange PLEASE HELP
#include <stdio.h> int main() { int x, y; char whatsyourname [20]; scanf("%10d %8d %*f %10s", &x, &y, whatsyourname); printf("%d %d %s", x, y, whatsyourname); //its not putting the names i input //why please i am not getting it pls return 0; }
1 Antwort
+ 3
scanf will not read white space which I think you included in the name, you can use gets or fgets function for that