Pointer :
Pointer is the variable that stores the address of another variable .
How to calculate size of Pointer ?
- Size of Pointer can be evaluated by using sizeof operator
- Pointer stores the address of the Variable .
- Address of variable is nothing but the integer value .
- In C , for storing integer value 2 bytes are required .
- So Pointer variable requires 2 bytes of memory.
int main(void)
{
int num = 0;
int *ptr = NULL;
num = 15;
ptr = #
/* Output the size */
printf("Size of Pointer : %d Bytes",sizeof(pointer));
return 0;
}
Output :
Size of Pointer : 2 Bytes

0 Comments:
Post a Comment
Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email