fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. {
  6. int p = 5;
  7. printf("%d", p); //p is known here
  8. }
  9.  
  10. printf("%d", p); // wait, what is p????
  11.  
  12. return 0;
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function 'main':
prog.c:10:15: error: 'p' undeclared (first use in this function)
  printf("%d", p);  // wait, what is p????
               ^
prog.c:10:15: note: each undeclared identifier is reported only once for each function it appears in
stdout
Standard output is empty