Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Memory of a Void pointer

Tags:

c

pointers

This is kind of a very basic question. I just wanted to know what will be in the memory of a void type of pointer.

Any help is really appriciated. Thanks!

like image 674
Shash Avatar asked Mar 27 '26 10:03

Shash


1 Answers

A void pointer is just a value which provides an address in memory. What is actually pointed to by a void pointer cannot be determined without further information.

As to what is in the memory occupied by the void pointer, it will be a 32 bit value on a 32 bit architecture and 64 bit value on a 64-bit architecture (and so on.)

Interpretation of this value is very much dependent on the underlying architecture and how it implements memory addressing.

like image 66
Nick Avatar answered Mar 30 '26 02:03

Nick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!