CJCoding With Joseph
15free / daySign inCreate account

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