GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Programming  >  C

 Print  |  
Question:  Why don\'t we add null pointer at the end of array of integer?How can we calculate the length of array of integer?



January 01, 2006 06:38:03 #3
 Prathibha   Member Since: December 2005    Total Comments: 4 

RE: Why don't we add null pointer at the end of array...
 

we can calculate the length of an integer array by the following code

int array = {1,3,45,6,56};

size = sizeof(array)/sizeof(int);

     

 

Back To Question