CJCoding With Joseph
15free / daySign inCreate account

The Player struct and the pointer ptr (which points at p) are already set up, and the program reads a name and a score from input. Print the two fields using ptr->, then add 10 to the score through ptr and print it again.

For the input: Ada 30

the expected output is exactly what is shown in Expected Output.

Expected output

Name: Ada
Score: 30
Bonus score: 40

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

Hints4 available
Topics
Pointers
Auto-input
Ada 30\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 (cout, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.