online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/* --- PRINTF_BYTE_TO_BINARY macro's --- */ #define BINARY_PATTERN "%c%c%c%c%c%c%c%c" #define BYTE_TO_BINARY(i) \ (((i) & 0x80) ? '1' : '0'), \ (((i) & 0x40) ? '1' : '0'), \ (((i) & 0x20) ? '1' : '0'), \ (((i) & 0x10) ? '1' : '0'), \ (((i) & 0x08) ? '1' : '0'), \ (((i) & 0x04) ? '1' : '0'), \ (((i) & 0x02) ? '1' : '0'), \ (((i) & 0x01) ? '1' : '0') /* --- end macros --- */ #include <stdio.h> int main() { // Bit positions // 76543210 int val1 = 0b00101101; int val2 = 0b00000000; int val3 = val1 | val2; printf("result: " BINARY_PATTERN "\n", BYTE_TO_BINARY(val3)); 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