← Back to Structs
Question 400
Size of a Struct
Size of a Struct
Astruct Triplecontains threeintfields:a,b, andc. Print the number of bytes the struct occupies usingsizeof(see Expected Output). 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= newline. No newline after the last line.
Hints2 available
Sign in to use hintsTopics:
Structs
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · 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.