โ Back to Structs
Question 330
Size of a Struct
Size of a Struct
Astruct Triplecontains threeintfields:a,b, andc. Print the number of bytes the struct occupies usingsizeof: 12 Eachintis 4 bytes, so three of them total 12. Print thesizeofresult with%zu(it is asize_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.