online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
global_list = [1] global_int = 1 def foo2(a=global_list,b=global_int): print('global_list:') print(global_list) # implicity global print('global_int:') print(global_int) # implicity global foo2() global_list = [2] global_int = 2 foo2() def foo3(a=global_list,b=global_int): print('global_list:') print(global_list) # implicity global global_list.remove(2) # yes, i'm "cheating" global_list.append(3) print(global_list) # implicity global print('global_int:') print(global_int) # local print('the error is in the previous line is because this next line assignment makes global_int a local var') global_int = 3 print(global_int) foo3()

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