โ 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
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.