0
Doubt
Difference between scanf("%c",&a) and a=getchar()
1 Resposta
+ 1
getchar can literally be read as "get a character" (singular) meaning it just grabs one character at a time.
scanf will take the first occurence of a char array (no spaces) and assign it to a memory address for later (what '&' is for)
Basically, getchar() for 1 character, scanf for a single word w/ no spaces, and fgets for grabbing sentences. (you'll learn about that one very soon!)