fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a ;
  6. cin>>a;
  7. if(a)int b = 1;
  8. else char b ='a';
  9. cout<<b;
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:9:7: error: 'b' was not declared in this scope
 cout<<b;
       ^
stdout
Standard output is empty