fork download
  1. typedef struct student
  2. {
  3. int age;
  4. char *name;
  5. };
  6.  
  7. int main()
  8. {
  9. struct student s1; // OK
  10. student s2; // error
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 2292KB
stdin
Standard input is empty
compilation info
prog.c:5:1: warning: useless storage class specifier in empty declaration [enabled by default]
 };
 ^
prog.c: In function ‘main’:
prog.c:10:2: error: unknown type name ‘student’
  student s2; // error
  ^
prog.c:10:10: warning: unused variable ‘s2’ [-Wunused-variable]
  student s2; // error
          ^
prog.c:9:17: warning: unused variable ‘s1’ [-Wunused-variable]
  struct student s1; // OK
                 ^
stdout
Standard output is empty