Computer Science, asked by crazynila4640, 7 hours ago

Write a C program to illustrate self-referential structures in c​

Answers

Answered by umakashyap344
1

Answer:

You can define pointers to structures in the same way as you define pointer to any other variable −

struct Books *struct_pointer;

Now, you can store the address of a structure variable in the above defined pointer variable. To find the address of a structure variable, place the ‘&’; operator before the structure’s name as follows −

struct_pointer = &Book1;

To access the members of a structure using a pointer to that structure, you must use the → operator as follows −

struct_pointer->title;

Let us re-write the above example using structure pointer.

Similar questions