answersLogoWhite

0

Create a pointer of the type (pointer to struct) and assign the address of an instance of the structure to your pointer:

typedef struct x { /* ... */ };

struct x my_structure;

struct x* ptr = &my_structure;

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

32 can you create a linked list with out structure pointer?

Not in C, no.


What is pointer to a member in objective c?

It is a pointer that points to a member of a structure.


How is a structure type pointer variable declared in c?

struct thisorthat *ptr;


How will you implement a function pointer inside a structure in c?

Nothing special: struct foo { void *ptr; };


Can you create pointer to a reference in c?

The C language does not support references, that is, the C++ concept of creating an alias to a variable. You can create pointers and dereference them, or you can use the preprocessor's #define mechanism to use another name for a variable. Even in C++, however, you cannot create a pointer to a reference. If you try to, you will end up creating a pointer to the original value. This is because all a reference is is an automatically dereferenced pointer - a compiler shortcut, rather than a totally new feature. So the limitation of not being able to point at a reference isn't really too bad.


How do you create modules in c language?

by using structure in c.........


What is a structure pointer?

A pointer is a variable that holds address information. For example, in C++, say you have a Car class and another class that can access Car. Then, declaring Car *car1 =new Car() creates a pointer to a Car object.. The variable "car1" holds an address location.


What a structure must include if it is a self -referential structure in C programming?

Pointer, eg: struct Person { struct Person *father, *mother, *spouse; int age; char *name; };


How can you offset a pointer in C?

Increment or decrement the pointer by the required offset.


Pointer arithemetic in C?

no


Are structures and pointers related in c plus plus?

Not really, but you can have: - a pointer pointing to a structure (FILE * is an example) - a pointer pointing to a structure-member (eg: struct tm tm; int *ip= &tm.tm_year) - a structure-member that is a pointer (any type) Example: typedef struct TreeNode { struct TreeNode *left, *right; int data; } TreeNode; TreeNode *root = (TreeNode *)calloc (sizeof (TreeNode), 1);


What is the purpose of pointer in C?

the purpose of pointer in c for saving the memory space.,and reduce the length and complexity of the program

Trending Questions
If your audience is new to a subject What key principle should you keep in mind when presenting your information? If 21.35 mL of 0.005M Iodine solution is needed to titrate a solution of commercial vitamin C tablet 500 milligrams prepared in a 100-milliliter volumetric flask then what is the mass percent of vit C? What is the value of a Belgium A5 Browning twenty serial 7Z81? Is a diode part of an alternator or the car? What does this excerpt reveal about Caesars attitude toward death? How much are Yoshi slippers in duchess? How do clams support themselves? Auto accident on Private Party where the Cops Came but no Tickets were issued we had expired Insurance by one day do i the uninsured have to pay damages if they wont go through their insurance company? What is the main export of Great Britain? What is 163696 sq mi in Kilometers? What is a good title for a paper about moving? When you add decimals should the numbers have the same amount of digits? How does archeologists know that the Roman Forum existed? What counties are Italy friends with? Is lacey mosley autistic? When an object at rest explodes into two part fly apart must they move in exactly opposite directions(b) when a moving object strikes a stationary one must they move off in exactly opposite directions? How much hp in a 2003 Infiniti g35? Where is the block heater on a 1997 7.3? Can the police take you to jail for an eviction if you haven't went to court? Where can one watch Mission Impossible Video online?