<P> A third way of initializing a structure is to copy the value of an existing object of the same type </P> <P> The following assignment of a struct to another struct will copy as one might expect . Depending on the contents, a compiler might use memcpy () in order to perform this operation . </P> <P> Pointers can be used to refer to a struct by its address . This is particularly useful for passing structs to a function by reference or to refer to another instance of the struct type as a field . The pointer can be dereferenced just like any other pointer in C, using the * operator . There is also a -> operator in C which dereferences the pointer to struct (left operand) and then accesses the value of a member of the struct (right operand). </P> <P> C does not allow recursive declaration of struct; a struct cannot contain a field that has the type of the struct itself . But pointers can be used to refer to an instance of it: </P>

Creating an instance of a struct in c