fork(1) download
  1. struct Personendaten{
  2. char Vorname;
  3. char Nachname;
  4. int Alter;
  5. int Groesse;
  6. int Gewicht;};
  7. int a;
  8. int b;
  9. int c;
  10. int d;
  11. struct Personendaten Person[20];
  12. for(a=0; a<=20; a++){
  13. scanf ("%s", &Person[a].Vorname);
  14. scanf ("%s", &Person[a].Nachname);
  15. scanf ("%d", &Person[a].Alter);
  16. scanf ("%d", &Person[a].Groesse);
  17. scanf ("%d", &Person[a].Gewicht);
  18. for(c=0; c<=a; c++){
  19. printf("Vorname:");
  20. printf("%d\n", Person[c].Vorname);
  21. printf("Alter:");
  22. printf("%d\n", Person[c].Alter);
  23. printf("Groesse:");
  24. printf("%d\n", Person[c].Groesse);
  25. printf("Gewicht:");
  26. printf("%d\n", Person[c].Gewicht);
  27. }}}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:12:1: error: expected identifier or ‘(’ before ‘for’
 for(a=0; a<=20; a++){
 ^~~
prog.c:12:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<=’ token
 for(a=0; a<=20; a++){
           ^~
prog.c:12:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘++’ token
 for(a=0; a<=20; a++){
                  ^~
prog.c:27:3: error: expected identifier or ‘(’ before ‘}’ token
 }}}
   ^
stdout
Standard output is empty