← Back to Structs
Question 406
Print an Array of Structs
Print an Array of Structs
An array of threestruct Pointvalues holds{1,2},{3,4}, and{5,6}. Loop over the array and print each point asx,yon its own line (see Expected Output). Each line, including the last, ends with a newline. Use aforloop andprintf("%d,%d\n", ...).
Expected Output:
1,2 3,4 5,6
= newline. The output ends with a newline — print one 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.