fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4.  
  5. struct _answer{
  6. double a;
  7. double b;
  8. };
  9.  
  10. int so(int a);
  11.  
  12. int main(void)
  13. {
  14. struct _answer b;
  15. so(1,b);
  16. printf("%d %d",b.a ,b.b );
  17. return 0;
  18. }
  19.  
  20. int so(int a,struct b){
  21. b.a = a;
  22. b.b = b;
  23. return b;
  24. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:15: error: too many arguments to function ‘so’
prog.c:16: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘double’
prog.c:16: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘double’
prog.c: At top level:
prog.c:20: warning: ‘struct b’ declared inside parameter list
prog.c:20: warning: its scope is only this definition or declaration, which is probably not what you want
prog.c:20: error: parameter 2 has incomplete type
prog.c:20: error: conflicting types for ‘so’
prog.c:10: error: previous declaration of ‘so’ was here
prog.c: In function ‘so’:
prog.c:20: error: parameter name omitted
prog.c:21: error: ‘b’ undeclared (first use in this function)
prog.c:21: error: (Each undeclared identifier is reported only once
prog.c:21: error: for each function it appears in.)
stdout
Standard output is empty