Computer Science, asked by Superb2687, 1 year ago

what is the size of *ptr in a 32-bit machine, (assuming initialization as int *ptr = 10;)?

Answers

Answered by gayatrib136
0

A pointer is a variable which stores memory address of another variable assigned to it

for example :

int s = 10;

int *ptr ;

ptr =s ; // pointer initialised

A memory required by pointer totally depends on the bits of machine

Suppose if you have 32 bits machine a pointer will require 32 bits (4 bytes ) of memory to be stored .

And if your machine is a 62 bits machine then a pointer will require 62 bits (8 bytes ) of memory to be stored .

Regardless of what data type they are pointing to, they have fixed size.

(As you have specified in the questions that "a integer pointer" data type doesnt matter dear!!)

thats it


Similar questions