CJCoding With Joseph

Read a Field Through a const Pointer

A struct Point with x = 8 and y = 9 is pointed to by a const struct Point *ptr, meaning you may read the struct but not modify it through the pointer. Print the sum of its two fields:

17

Access the fields with ptr->x and ptr->y. There is no trailing newline.

Expected Output:

17
Topics:
Structs
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.