#include <stdio.h> int main(void) { { int p = 5; printf("%d", p); //p is known here } printf("%d", p); // wait, what is p???? return 0;}
Standard input is empty
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
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!