0

Fgets() - where did I go wrong in this code?

https://code.sololearn.com/c9ZqA4PwjBb6/?ref=app I used the following syntax for fgets[char,arraysize,stdin] and stdout for fputs but I got a lot of errors. Where did I go wrong?

4th Jul 2021, 1:40 PM
Srinath
3 Respuestas
+ 2
#corrected code #include <stdio.h> int main() { char a='g'; putchar(a); char b[100]; fgets(b,100,stdin); fputs(b,stdout); //remove size return 0; }
4th Jul 2021, 1:43 PM
Jayakrishna 🇮🇳
+ 1
Jayakrishna🇮🇳 oh thanks works perfectly!
4th Jul 2021, 1:45 PM
Srinath
+ 1
You're welcome..
4th Jul 2021, 1:46 PM
Jayakrishna 🇮🇳