practice_C

Pointers and Structures

Exercises

  1. Create a student structure and display and modify its name and marks through a structure pointer using -> and (*ptr).member.
  2. Read rectangle length and width through a structure pointer, then calculate its area in another function that accepts a pointer to a constant structure.

Click here for explanation and solution.