← Back to Structs
Question 398
Store a Name in a Struct
Store a Name in a Struct
Astruct Personholds achar name[20]and anint age. Create a person named"Ada"who is 36 years old, then print the output shown in Expected Output. Useprintfwith%sfor the name and%dfor the age. There is no trailing newline.
Expected Output:
Ada is 36= newline. No newline after the last line.
Hints2 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.