How a pointer stores address?

 Posted by Abhisek on 7/27/2010 | Category: Others Interview questions | Views: 2766

A pointer is a variable which stores address of other variable. Pointer only stores the first byte of address and then we can find upcoming bytes according to the size of the variable.

For example if a variable of integer type is being accessed by a pointer. So the pointer will only store the first byte of the address and as integer datatype takes two bytes memory the next byte of address location can be find out by adding 1 to the first byte of the address.

Source: Interview | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response