fork download
  1. #include <stdio.h>
  2.  
  3. void main() {
  4. char str[10];
  5. printf("Enter the String...:");
  6. gets(str,5,5,5,5,5);
  7. puts(str);
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:3:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
 void main() { 
      ^
prog.c: In function ‘main’:
prog.c:6:1: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
 gets(str,5,5,5,5,5);
 ^
prog.c:6:1: error: too many arguments to function ‘gets’
In file included from prog.c:1:0:
/usr/include/stdio.h:638:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^
stdout
Standard output is empty