answersLogoWhite

0

By declaring an integer pointer you are declaring that any non-zero reference stored in the pointer is guaranteed to be an integer reference. In order to guarantee the reference is actually a structure, the pointer must be declared as such, because casting an integer to a structure can never be regarded as being type-safe.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Why you use float pointer instead of integer pointer?

It depends on what type of data you wish to manipulate.


What is triple pointer?

Example: int x; -- integer int *px= &x; -- pointer to integer int **ppx= &px; -- pointer to pointer to integer int ***pppx= &ppx; -- pointer to pointer to pointer to integer


What is the effect of various arithmetic operators on a pointers?

Error message, mainly. The following operations are legal: ptr + integer (pointer) ptr - integer (pointer) ptr - ptr (integer)


What is the difference between structure and pointer?

A structure is a collection of primitives or other structures. A pointer is a memory address. Comparison of the two is like comparing bowling balls to cinder blocks. You can say that a structure defines the layout of the data, while a pointer points to data that is a particular structure.


What is pointer to a member in objective c?

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


How can one create a pointer to structure in C?

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;


What is the size of integer pointer?

all pointers are 4 bytes in 32 bit system


How do declare function pointer having two integer parameters and returning integer pointers?

// declare a function int* function(int, int); or int* (function)(int, int); // declare a pointer to a function int* (*pointer_to_function)(int, int);


What is the purpose of the dereference operator when used with a pointer variable?

Data type is mandatory in every variable-declaration.Example:int i; -- integerint *pi; -- integer-pointerint ai[10]; -- integer-arrayint *api[10]; -- array of integer-pointersint (*api)[10]; -- pointer to integer-array


Can you make an integer pointer variable to char data?

Of course. But why? int *p = (int *)"string";


Function pointer that will point to a function that takes integer value and return character?

Answerchar (*funcp(int));


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

Not in C, no.