473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

why stack contails garbage value and heap contains zero !!!!!!!!!!!!!!!!

hi i need explanation why stack contains garbage while we refer to stack default is any method to clean the stack my program exit so that my stack should contain zero as default ...............................
Nov 8 '06 #1
1 1479
r035198x
13,262 8TB
hi i need explanation why stack contains garbage while we refer to stack default is any method to clean the stack my program exit so that my stack should contain zero as default ...............................
You are not being very clear here. From the sound of your post only I will point out that if you declare a variable without initialising it, it will be given a garbage value. If you want the variable to default to zero, then initialise it zero.
If you are going to explain the problem further, please do so with some code that you have written so others can understand better your problem.
Nov 8 '06 #2

Sign in to post your reply or Sign up for a free account.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.