CJCoding With Joseph

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
๐Ÿ“ฅ Auto-Input:
Mia Toronto 12345\n
This input is automatically fed to your program's stdin
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.