I am trying to read a string of characters in C: If I use gets, the compiler doesnt read my word, because it considers ENTER as being my string, I guess. I tried using
scanf("%*c")
but then if i do that and type "flower", the variable stores the string "lower". If I use
scanf("%s",s)
then the compiler doesn`t store anything after I hit space. If I use
fgets(s,20,stdin)
I have the exact same problem as if I used gets. What should I do?
scanf("%*c")?? missing second argument...%*cwill read and discard the character , which don't have to pass any arguments