CJCoding With Joseph

Size of a Struct

A struct Triple contains three int fields: a, b, and c. Print the number of bytes the struct occupies using sizeof:

12

Each int is 4 bytes, so three of them total 12. Print the sizeof result with %zu (it is a size_t). There is no trailing newline.

Expected Output:

12
Topics:
Structs
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (p, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.