The size of pointer depends on what ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

The size of pointer depends on what ?

7th Aug 2019, 5:18 PM
Ashwin Raj
Ashwin Raj - avatar
5 Answers
+ 7
whether the os is 32bit or 64bit
7th Aug 2019, 5:46 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 6
It depends on architecture of your computer..if it is 32 bit then pointer will be of 4 bytes ,and pointer will be of 8 bytes if machine is of 64 bit.
7th Aug 2019, 5:51 PM
Lavkush Singh
Lavkush Singh - avatar
+ 2
The type of machine architecture.
8th Aug 2019, 2:41 AM
Sonic
Sonic - avatar
+ 1
it invariably depends upon the data type.... like int* is of 4 bytes and char* is actually infinite 😂
8th Aug 2019, 2:42 AM
Aditya
Aditya - avatar
+ 1
it invariably depends upon the data type.... like int* is of 4 bytes and char* is actually infinite 😂 Sorry, no! A pointer is always a memory adress. And the size of memory adresses is depending of hardware and OS. You are talking about, what a pointer points to. This is, of course, different.
15th Aug 2019, 11:35 AM
Moritz
Moritz - avatar