online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> int main() {//---------------------------->scope1 started here //------v---------------------->this variable x is in scope1 int x=5; {//------------------------>scope2 started here //----------v------------------>this variable x is in scope2 int x= 6; //------------v---------------->this prints scope2's x value std::cout<<x; }//------------------------>scope2 ends here and x from scope2 is destroyed //--------v---------------->this prints scope1's x value std::cout<<x; }//---------------->scope1 ends here

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue