fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. struct {
  5. char name[10];
  6. enum type {email, number, init};
  7. union {
  8. char email[10];
  9. double number;
  10. char initials;
  11.  
  12. } id;
  13.  
  14. };
  15.  
  16. struct Soph = {"Soph", email, .email = "sbderosa" };
  17.  
  18. printf("%s", Soph.email);
  19. }
  20.  
  21.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:6:34: warning: declaration does not declare anything
   enum type {email, number, init};
                                  ^
prog.c:14:2: warning: unnamed struct/union that defines no instances
  };
  ^
prog.c:16:14: error: expected identifier or ‘(’ before ‘=’ token
  struct Soph = {"Soph", email, .email = "sbderosa" };
              ^
prog.c:18:15: error: ‘Soph’ undeclared (first use in this function)
  printf("%s", Soph.email);
               ^~~~
prog.c:18:15: note: each undeclared identifier is reported only once for each function it appears in
stdout
Standard output is empty