Originally Posted by
laserlight
Your first struct declaration is not syntactically correct in the first place.
I missed bracket
lets take an example of a structure
Code:
struct student {
char name[30]; //name of type char[30]
int rollNo; //rollNo of type int
struct dateOfBirth *age; //age of type struct dateOfBirth*
} DOB; /* created structure varoable DOB */
I don't understand red line in the structure
Code:
struct student {
char name[30]; //name of type char[30]
int rollNo; //rollNo of type int
struct dateOfBirth *age; //age of type struct dateOfBirth*
} DOB; /* created structure varoable DOB */
Pointer is variable that hold the address of another variable
We have declared structure datoFBirth using pointer
What is use of this line struct dateOfBirth *age; ?
I think it's structure member that is pointer to structure and age is pointer that store the address
What;s the pointer pointing here