online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include "ExampleSelect.h" // ============================================================================= #ifdef Example_2 const int iVar = 1; #endif // End of "#ifdef Example_2" #ifdef Example_4 static const int iVar = 1; #endif // End of "#ifdef Example_4" #ifdef Example_6 extern const int iVar; #endif // End of "#ifdef Example_6" // ============================================================================= #ifdef Example_7 extern const int iVar; #endif // End of "#ifdef Example_7" #ifndef Example_7 void f1_use_iVar(void); #endif // End of "#ifndef Example_7" // ============================================================================= int main(void) { printf("=============================================================================\n"); printf("Hello World!\n"); printf("main(); -> iVar = "); if( iVar ) printf("1\n"); else printf("0\n"); f1_use_iVar(); return 0; } // ============================================================================= #ifdef Example_1 #pragma message("defined -> Example_1") #endif // End of "#ifdef Example_1" #ifdef Example_2 #pragma message("defined -> Example_2") #endif // End of "#ifdef Example_2" #ifdef Example_3 #pragma message("defined -> Example_3") #endif // End of "#ifdef Example_3" #ifdef Example_4 #pragma message "defined -> Example_4" #endif // End of "#ifdef Example_4" #ifdef Example_5 #pragma message("defined -> Example_5") #endif // End of "#ifdef Example_5" #ifdef Example_6 #pragma message("defined -> Example_6") #endif // End of "#ifdef Example_6" #ifdef Example_7 #pragma message("defined -> Example_7") #endif // End of "#ifdef Example_7"
#include <stdio.h> #include "ExampleSelect.h" // ============================================================================= #ifdef Example_2 const int iVar = 1; #endif // End of "#ifdef Example_2" #ifdef Example_4 static const int iVar = 1; #endif // End of "#ifdef Example_4" #ifdef Example_5 const int iVar = 1; #endif // End of "#ifdef Example_5" #ifdef Example_6 const int iVar = 1; #endif // End of "#ifdef Example_6" #ifdef Example_7 const int iVar = 1; #endif // End of "#ifdef Example_7" // ============================================================================= void f1_use_iVar(void) { printf("f1_use_iVar(); -> iVar = "); if( iVar ) printf("1\n"); else printf("0\n"); }
/* !!!! Select only one of "Example_" !!!! */ // ============================================================================= //#define Example_1 //#define Example_2 //#define Example_3 //#define Example_4 //#define Example_5 #define Example_6 //#define Example_7 // ============================================================================= #ifdef Example_1 const int iVar = 1; #endif // End of "#ifdef Example_1" #ifdef Example_3 static const int iVar = 1; #endif // End of "#ifdef Example_3"

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