general computer science questions about memory - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

general computer science questions about memory

I have some questions that I have always wanted to know the answer to.

1. I want to know when I declare in a program ( for instance in C programming) :

[code]int a;[/code]

How does the CPU find and determine where to allocate space for variables?

2. If I print the variable out - I get some previous number. So I wonder if the CPU allocated space where another value was - that wasn't important in memory. Where did this other value come from?

3. When you boot up a computer, the first thing that executed is the boot strap code in the CPU solid state instructions set, THEN that starts up the resident OS. Which means that boot strap is in a isolated memory of the CPU, RIGHT??

If I am wrong anywhere above in my computer science theory- PLEASE correct me.

Thanks







K.J.Williams
Sign In or Register to comment.