CJCoding With Joseph
15free / daySign inCreate account

Print an Array of Structs

An array of three struct Point values holds {1,2}, {3,4}, and {5,6}. Loop over the array and print each point as x,y on its own line (see Expected Output).

Each line, including the last, ends with a newline. Use a for loop and printf("%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
Topics:
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.