CJCoding With Joseph
15free / daySign inCreate account

Array of Individually Allocated Score Pointers

In the first loop, give each of the three slots of scores its own heap int holding the matching number out of the values array (88, 92 and 75). The printing loop in the middle is already written. In the last loop, hand every one of those heap ints back.

Print exactly what is shown in Expected Output.

Free the memory you allocate before the program ends — this question checks for memory leaks.

Expected Output:

Score 1: 88
Score 2: 92
Score 3: 75

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
Pointers
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.