answersLogoWhite

0

It depends on the platform...

In a 16 bit environment, such as DOS or Windows 3.x, a near pointer is two bytes, while a far pointer is 4 bytes.

In a 32 bit environment, such as Win32, a pointer is 4 bytes.

In a 64 bit environment, such as Win64, a pointer is 8 bytes.

If you want to find out in your particular environment, look at sizeof(ptr), where ptr is declared as a pointer to something.

char* ptr;

std::cout << sizeof(ptr) << std::endl;

Note that the size of the pointer is not the same as the size of the object to which it points. If you looked at sizeof(*ptr), you would get 1.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

How many bytes are required to store an float in ADA?

four


How many bytes are required to store an unsigned integer range?

4


How many bits or bytes required to store the robot?

40 bits or 5 byrtes


How many bytes are read in pointers by pointers dereferencing?

When you dereference a pointer you "read" the number of bytes determined by the pointer's type. That is, a char pointer dereferences a single byte while an int pointer dereferences 4 bytes (assuming a 32-bit int) -- regardless of the type actually stored at that address. However, note that a pointer can only actually point at a single byte since it only has storage for a single memory address. How many additional bytes are dereferenced is entirely dependant on the type of the pointer. To determine how many bytes are actually allocated to an address, use the sizeof operator, passing a dereferenced pointer (the pointer must point at the start of the allocation). If the pointer points at several elements of the same type (an array), then divide the total bytes by the size of the pointer's type to determine the number of elements in the array.


How many bytes are required to store a character string?

about eight bits, which is equal to one byte


How many bytes are required to store the word intelligent?

The word &quot;intelligent&quot; consists of 11 characters. In standard encoding, such as UTF-8 or ASCII, each character typically requires 1 byte. Therefore, to store the word &quot;intelligent,&quot; 11 bytes are required.


How many bytes are required to store a number in binary?

The number of bytes required to store a number in binary depends on the size of the number and the data type used. For instance, an 8-bit byte can store values from 0 to 255 (or -128 to 127 if signed). Larger numbers require more bytes: a 16-bit integer uses 2 bytes, a 32-bit integer uses 4 bytes, and a 64-bit integer uses 8 bytes. Thus, the number of bytes needed corresponds to the number of bits needed for the binary representation of the number.


How many bytes in a pointer address?

Suppose that we're talking about C on an x86 32-bit processor it should be 4-bytes (32-bits). Since the pointer has to be able to hold any memory location it should be the same number of bits as the processor.


How many bytes are used to store a 64-bit number?

how many bytes are there in a 64-bit machine? Another Answer: It takes 8 bytes to store a 64 bit number.


How many bytes are used to store a 64 bit number?

how many bytes are there in a 64-bit machine? Another Answer: It takes 8 bytes to store a 64 bit number.


How many bytes are required for LCALL?

3-byte


How many bytes are needed to store 32767?

32767 is the maximum value that can be stored in two bytes.