CJCoding With Joseph
15free / daySign inCreate account

Read two integers into a and b, then declare int pointers pa and pb holding their addresses. Print the sum and the difference using ONLY the dereferenced pointers (*pa and *pb) - the names a and b must not appear inside the printf calls.

Input: two integers separated by a space.

For the input 3 4 print exactly the output shown in Expected Output.

Difference means *pa - *pb (first number minus second).

Expected output

Sum: 7
Difference: -1

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

Hints4 available
Topics
Pointers
Auto-input
3 4\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 (p, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.