fork(3) download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. {
  6. extern int i;
  7. int i=20;
  8. {
  9. const volatile unsigned i=30; printf("%d",i);
  10. }
  11. printf("%d",i);
  12. }
  13. printf("%d",i);
  14. }
  15. int i;
Compilation error #stdin compilation error #stdout 0s 9424KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:7:13: error: declaration of ‘i’ with no linkage follows extern declaration
         int i=20;
             ^
prog.c:6:20: note: previous declaration of ‘i’ was here
         extern int i;
                    ^
prog.c:13:13: error: ‘i’ undeclared (first use in this function)
 printf("%d",i);
             ^
prog.c:13:13: note: each undeclared identifier is reported only once for each function it appears in
stdout
Standard output is empty