ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  VC++  >>  MFC
 
 


 

 
 MFC interview questions  MFC Interview Questions
 ATL interview questions  ATL Interview Questions
 COM DCOM interview questions  COM DCOM Interview Questions
 Win32API interview questions  Win32API Interview Questions
 ActiveX interview questions  ActiveX Interview Questions
 VC++ AllOther interview questions  VC++ AllOther Interview Questions
Question
Why Array Index starts from Zero
 Question Submitted By :: K.ramaswamy
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Why Array Index starts from Zero
Answer
# 1
This boils down to the concept of Binary digits. Take an 
array size of 64 for example. We start from 0 and end at 
63. We require 6 bits.But, if we were to start from 1 and 
end at 64, we would require 7 bits to store the same 
number, thus increasing the storage size.
 
Is This Answer Correct ?    4 Yes 0 No
Chandan Singh From Niit
 
  Re: Why Array Index starts from Zero
Answer
# 2
the index of array, which is of the form a[i], is converted 
by the compiler in the form [a+i]. So, the index of first 
element is zero because [a+0] will give 'a' & the first 
array element can be accessed. Due to this, we can also 
access the array elements as'i[a]' instead of 'a[i]' , & 
this will not produce an error.
 
Is This Answer Correct ?    6 Yes 0 No
Pooja Sonawane
 
 
 
  Re: Why Array Index starts from Zero
Answer
# 3
i think 2nd answer is correct
'we can also 
access the array elements as'i[a]' instead of 'a[i]' , & 
this will not produce an error' is wrong
 
Is This Answer Correct ?    0 Yes 1 No
Murukesan
 
  Re: Why Array Index starts from Zero
Answer
# 4
Both Answer ARE correct but First one is EXACT and after 
that compiler is design according to that
 
Is This Answer Correct ?    2 Yes 0 No
Chetan
 

 
 
 
Other MFC Interview Questions
 
  Question Asked @ Answers
 
How do you change the properties for a tree view control that is part of the CTreeView class?  1
Explain about MDI and CMultiDocTemplate ?  2
What is a critical section and how is it implemented?  1
What interface must be supported by an ActiveX control?  1
What is the size of class Aircom10
Does the application have more than one object? If no, then what is the reason?  5
I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS) Invensys2
what is the component of CLR ? AZTEC3
Difference between Cclint DC & Cpaint Dc E-Logic2
How many types of combo box are their E-Logic1
i have created runtime menu -- ( admistrator ->managepackage,manage module). but now i want to open a dialog when i select manage package and any other diaolg when selecting manage module ( whole selection is at run time only ) . Please HELP .its urgently required Patni2
WHAT IS DIFFERENT BETWEN RELEASE MODE & DEBUGGING MODE Microsoft1
If there is more than 100 control in a window how we can change the Taborder of a controls Satyam2
What is LoadLibrary function returns?  6
if i modified data in 1 view how does the other view knows Siemens1
What function is used to retrieve the currently selected index in a list box?  2
How to handle command line arguements from simple MFC application ?  1
How to convert a CString variable to char* or LPTSTR? Dover4
what is the use of Mutex and critical section  2
How to create a Modeless Dialog?  4
 
For more MFC Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com