fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. struct chartgen{
  4. char[]inputname;
  5. char[]outputname;
  6. char[]validationfile;
  7. char[]type;
  8. }
  9. int main(void) {
  10. char[]command=malloc(sizeof(char[]));
  11. printf(“enter chartgen command“);
  12. scanf(%s”,command);
  13. printf(%s”,command);
  14.  
  15. // your code goes here
  16. return 0;
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:4:6: error: expected identifier or '(' before '[' token
  char[]inputname;
      ^
prog.c:5:6: error: expected identifier or '(' before '[' token
  char[]outputname;
      ^
prog.c:6:6: error: expected identifier or '(' before '[' token
  char[]validationfile;
      ^
prog.c:7:6: error: expected identifier or '(' before '[' token
  char[]type;
      ^
prog.c:8:2: warning: no semicolon at end of struct or union
  }
  ^
prog.c:9:1: error: expected ';', identifier or '(' before 'int'
 int main(void) {
 ^
prog.c: In function 'main':
prog.c:10:6: error: expected identifier or '(' before '[' token
  char[]command=malloc(sizeof(char[]));
      ^
prog.c:11:2: error: stray '\342' in program
  printf(“enter chartgen command“);
  ^
prog.c:11:2: error: stray '\200' in program
prog.c:11:2: error: stray '\234' in program
prog.c:11:12: error: 'enter' undeclared (first use in this function)
  printf(“enter chartgen command“);
            ^
prog.c:11:12: note: each undeclared identifier is reported only once for each function it appears in
prog.c:11:18: error: expected ')' before 'chartgen'
  printf(“enter chartgen command“);
                  ^
prog.c:11:18: error: stray '\342' in program
prog.c:11:18: error: stray '\200' in program
prog.c:11:18: error: stray '\234' in program
prog.c:12:1: error: stray '\342' in program
 scanf(“%s”,command);
 ^
prog.c:12:1: error: stray '\200' in program
prog.c:12:1: error: stray '\234' in program
prog.c:12:10: error: expected expression before '%' token
 scanf(“%s”,command);
          ^
prog.c:12:10: error: stray '\342' in program
prog.c:12:10: error: stray '\200' in program
prog.c:12:10: error: stray '\235' in program
prog.c:13:1: error: stray '\342' in program
 printf(“%s”,command);
 ^
prog.c:13:1: error: stray '\200' in program
prog.c:13:1: error: stray '\234' in program
prog.c:13:11: error: expected expression before '%' token
 printf(“%s”,command);
           ^
prog.c:13:11: error: stray '\342' in program
prog.c:13:11: error: stray '\200' in program
prog.c:13:11: error: stray '\235' in program
stdout
Standard output is empty