We can use the pointer as an array. To access the member variable of this type of the variable we can follow syntax of this example:
Program to store and display the name and age of n students using the concept of both structure and pointer.
struct student *std;
printf(“\nplease entere the number of students:\t”);
printf(“\nplease enter the name of the %dth student:\t”,i+1);
printf(“\nplease enter the age:\t”);