CJCoding With Joseph

Define a Struct Type with typedef

Use typedef to define a struct type named Rect that has two int fields, width and height. A Rect is then created with width 5 and height 3, and its fields are printed separated by a space:

5 3

The main function is already written; you only need to define the Rect type. 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.