online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
int B (int worthRef) { /* worthRef is now a local variable. If I return it, will it get destroyed once B finishes execution? */ worthRef = worthRef + 1; return (worthRef); } void A() { int netWorth = 20; int result = B(netWorth); printf("%d", result); // Also prints 21 } int main() { A(); }

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