Write a C Program to understand how pointer to structure returned from function. Here’s a Simple Program where we are going to find how the pointer to structure returned from a function in C Programming Language.
This program is used to store and access “name, roll no. and marks ” for many students using array of structures members.
C Structure : :
Accessing Structure : :
C structure can be accessed in 2 ways in a C program. They are,
Dot(.) operator is used to access the data using normal structure variable and arrow (->) is used to access the data using pointer variable.
Below is the source code for C Program to understand how pointer to structure returned from function which is successfully compiled and run on Windows System to produce desired output as shown below :
SOURCE CODE : :
OUTPUT : :
need an explanation for this answer? contact us directly to get an explanation for this answer