online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <stdio.h> struct node{ struct node const *left; struct node const *right; char const *key; int value; }; size_t tree_size(struct node const *tree) { if(!tree) return 0; return tree_size(tree->left) + 1 + tree_size(tree->right); } int main(int argc, char *argv[]) { struct node left = {.left = NULL, .right = NULL, .key = "leftNodeKey", .value=1}; struct node right = {.left = NULL, .right = NULL, .key = "rightNodeKey", .value=2}; struct node root = {.left = &left, .right = &right, .key = "rootKey", .value = 0}; printf("tree size: %zu\n", tree_size(&root)); return 0; }

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