GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Concepts  >  Data Structures
Go To First  |  Previous Question  |  Next Question 
 Data Structures  |  Question 159 of 202    Print  
what is the size of char pointer (IN BYTES)

  
Total Answers and Comments: 5 Last Update: February 19, 2007     Asked by: yashwant patel 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 06, 2006 06:58:39   #1  
digitalgenius Member Since: December 2006   Contribution: 2    

RE: what is the size of char pointer (IN BYTES)
Pointer is a variable that points to a specific location of memory (i.e. RAM). Same is true for char pointers also therefore size of char pointer is 4 bytes
 
Is this answer useful? Yes | No
December 18, 2006 06:39:34   #2  
kalayama Member Since: September 2006   Contribution: 501    

RE: what is the size of char pointer (IN BYTES)
Yes. that is correct in a 32-bit system. (4 bytes for pointer data type). It doesn't matter which type of variable it is pointing to. All it needs to do it hold the address.
 
Is this answer useful? Yes | No
February 01, 2007 04:28:59   #3  
chandru        

RE: what is the size of char pointer (IN BYTES)
any pointer its size is always two bytes
 
Is this answer useful? Yes | No
February 08, 2007 23:54:54   #4  
Subhra Kanti Sahu        

RE: what is the size of char pointer (IN BYTES)
Basically when ever we are using pointer that refers some other variables when the pointers refer some variable means it contains it address and addresses are stored in integer format. If the compiler support 32-bit then size of char * is 4 BYTES.



Subhra Kanti Sahu

 
Is this answer useful? Yes | No
February 19, 2007 11:07:26   #5  
Nidhi        

RE: what is the size of char pointer (IN BYTES)
Actually a pointer is just a address holder so its size is always that of an int data type what ever may be the type of pointer.In a 16-bit compiler its 2 bytes and in 32-bit compiler its 4 bytes(ie depeds on sizeof(int))
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape