GeekInterview.com
Home
Tech Articles
Code Samples
Learn
Freelance Projects
Online Testing
Geek Talk
Job Postings
Knowledge Base
Geek Blogs
Question Bank
Interview Questions
Certification
Placement Papers
Tech FAQ
Career Advice
Engineering
Ask Question
I am new,
Sign me up!
User Name
Remember Me?
Password
Interview Questions
Certification
Placement Papers
Tech FAQ
Career Advice
Engineering
Ask Question
GeekInterview.com
>
Interview Questions
>
Concepts
>
OOPS
Go To First
|
Previous Question
|
Next Question
OOPS
| Question 23 of 68
Print
Why C or C++ Stack index starts from 0.
Total Answers and Comments:
3
Last Update: November 05, 2008 Asked by:
hrusi_dalai
Sponsored Links
Best Rated Answer
—
No best answer available. Please pick the good answer available or
submit
your answer.
September 08, 2006 16:58:16
#1
RAJEEV CHOPRA
RE: Why C or C++ Stack index starts from 0.
Any basic units of memory representation bit bite starts from 0.
A byte contains 8 bits starting from 0 to 7.
This is the idea of stack and array in C C++ starts from 0.
Is this answer useful?
Yes
|
No
0
1
Overall Rating:
-1
April 08, 2007 02:36:18
#2
dhanasweet
Member Since: March 2007 Contribution: 29
RE: Why C or C++ Stack index starts from 0.
if we declare an array a[5] the memory allocate to each member will be accessed by a[0] a[1] .....a[4]. this is the reason index starts with zero.
Is this answer useful?
Yes
|
No
0
1
Overall Rating:
-1
November 05, 2008 16:56:44
#3
johnferguson
Member Since: November 2008 Contribution: 1
RE: Why C or C++ Stack index starts from 0.
Pointer arithmetic. Add 0 to the pointer and you get the pointer.
Is this answer useful?
Yes
|
No
Go To Top
Sponsored Links
Related Categories
—
Data Modeling Interview Questions
Data Structures Interview Questions
OLAP Interview Questions
OOPS Interview Questions
UML Interview Questions
Sponsored Links
Featured Free Offers
Request Your Copy
Request Your Copy
Request Your Copy
About Us
-
Privacy Policy
-
Terms and Conditions
-
Contact
-
Ask Question
-
Propose Category
-
Site Updates
Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved