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?
3 Respostas
+ 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;
}
+ 1
Jayakrishna🇮🇳 oh thanks works perfectly!
+ 1
You're welcome..