โ Back to Structs
Question 327
Define a Struct Type with typedef
Define a Struct Type with typedef
Usetypedefto define a struct type namedRectthat has twointfields,widthandheight. ARectis then created withwidth5 andheight3, and its fields are printed separated by a space: 5 3 Themainfunction is already written; you only need to define theRecttype. There is no trailing newline.
Expected Output:
5 3
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.