online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> int main() { struct { char char_1; double num_1; int num_2; char char_2; } s1; struct { char char_1; char char_2; int num_2; double num_1; } s2; struct __attribute__((packed, aligned(1))) { char char_1; char char_2; int num_2; double num_1; } s3; printf("Char: %ld\n", sizeof(char)); // 1 byte printf("Int: %ld\n", sizeof(int)); // 4 bytes printf("Double: %ld\n\n", sizeof(double)); // 8 bytes printf("s1: %ld\n", sizeof(s1)); printf("s2: %ld\n", sizeof(s2)); printf("s3: %ld\n", sizeof(s3)); 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