Pointers and Structures
Exercises
- Create a student structure and display and modify its name and marks through a structure pointer using
-> and (*ptr).member.
- 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.