Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Data structure alignment
//Title of this code //Compiler Version 18.00.21005.1 for x86 #include <iostream> typedef struct { char a; long b; char c; } Struct1; typedef struct { char a; char c; long b; } Struct2; typedef struct { long b; char a; char c; } Struct3; int main() { std::cout << "sizeof(char)=" << sizeof(char) << std::endl; std::cout << "sizeof(long)=" << sizeof(long) << std::endl; std::cout << sizeof(Struct1) << std::endl; std::cout << sizeof(Struct2) << std::endl; std::cout << sizeof(Struct3) << std::endl; }
run
|
edit
|
history
|
help
1
Please
log in
to post a comment.
Static cast of Enum
hangman
<string> Indirect include of <errno.h> with VSC++
Is a Union Member's Destructor Called
define own struct
Problem_rstring_1
"Mostly invalid states" and unordered_set
find vs at
masodijegy.cpp
Competitive - Algorithm for max number of superior characters
Please log in to post a comment.