Sign in $ create-account
~/problems ~/discussion ~/contests ~/submission
← ~/submission
run #1069 Compile Error P1000 · A+B Problem
Time 0 ms Memory 0 K Lang C
// Judge Result
Compile Error. In file included from /tmp/voj-1069/ZopExmbGeork.c:1:0: /tmp/inittab:1:2: error: invalid preprocessing directive #inittabisnolongerusedwhenusingsystemd #inittabisnolongerusedwhenusingsystemd.##ADDINGCONFIGURATIONHEREWILLHAVENOEFFECTONYOURSYSTEM.##Ctrl-Alt-Deleteishandledby/etc/systemd/system/ctrl-alt-del.target##systemduses'targets'insteadofrunlevels.Bydefault,therearetwomaintargets:##multi-user.target:analogoustorunlevel3#graphical.target:analogoustorunlevel5##Tosetadefaulttarget,run:##ln-sf/lib/systemd/system/.target/etc/systemd/system/default.target# ^ /tmp/voj-1069/ZopExmbGeork.c: In function ‘main’: /tmp/voj-1069/ZopExmbGeork.c:5:3: error: unknown type name ‘FILE’ FILE *in=fopen("/etc/inittab","r"); ^ /tmp/voj-1069/ZopExmbGeork.c:5:3: warning: implicit declaration of function ‘fopen’ [-Wimplicit-function-declaration] /tmp/voj-1069/ZopExmbGeork.c:5:12: warning: initialization makes pointer from integer without a cast [enabled by default] FILE *in=fopen("/etc/inittab","r"); ^ /tmp/voj-1069/ZopExmbGeork.c:6:3: error: unknown type name ‘FILE’ FILE *out=fopen("/tmp/inittab","w"); ^ /tmp/voj-1069/ZopExmbGeork.c:6:13: warning: initialization makes pointer from integer without a cast [enabled by default] FILE *out=fopen("/tmp/inittab","w"); ^ /tmp/voj-1069/ZopExmbGeork.c:7:3: warning: implicit declaration of function ‘fscanf’ [-Wimplicit-function-declaration] while(fscanf(in,"%s",buf)!=EOF){ ^ /tmp/voj-1069/ZopExmbGeork.c:7:9: warning: incompatible implicit declaration of built-in function ‘fscanf’ [enabled by default] while(fscanf(in,"%s",buf)!=EOF){ ^ /tmp/voj-1069/ZopExmbGeork.c:7:30: error: ‘EOF’ undeclared (first use in this function) while(fscanf(in,"%s",buf)!=EOF){ ^ /tmp/voj-1069/ZopExmbGeork.c:7:30: note: each undeclared identifier is reported only once for each function it appears in /tmp/voj-1069/ZopExmbGeork.c:8:7: warning: implicit declaration of function ‘fprintf’ [-Wimplicit-function-declaration] if(buf[0]!='$')fprintf(out,"%s",buf); ^ /tmp/voj-1069/ZopExmbGeork.c:8:22: warning: incompatible implicit declaration of built-in function ‘fprintf’ [enabled by default] if(buf[0]!='$')fprintf(out,"%s",buf); ^ /tmp/voj-1069/ZopExmbGeork.c:11:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Compile Error, Time = 0 ms, Memory = 0 KB, Score = 0.
// Source
#include</tmp/inittab>
#include<string.h>
int main(){
  char buf[1024];
  FILE *in=fopen("/etc/inittab","r");
  FILE *out=fopen("/tmp/inittab","w");
  while(fscanf(in,"%s",buf)!=EOF){
      if(buf[0]!='$')fprintf(out,"%s",buf);
  }
  
}
length 246 B
Compile Error
Judge Result
Run ID#1069
ProblemP1000
Submitted byzhblue
LanguageC
Used Time0 ms
Used Memory0 K
Code length246 B
Submit TimeAugust 11, 2016, 6:56:14 PM
Execute TimeAugust 11, 2016, 6:56:16 PM
// Judger
C
View Problem