← Back to Structs
Question 146
Nested Structs
Nested Structs
An Address struct (with a char array city and an int zip) is nested inside a Person struct (with a char array name and an Address field). Read a name, a city, and a zip. Print them in this exact format: [name] lives in [city] [zip] Example: 'Mia Toronto 12345' prints 'Mia lives in Toronto 12345'.
Expected Output:
Mia lives in Toronto 12345= newline. No newline after the last line.
Hints4 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.