-
November 23rd, 2002, 09:40 PM
#11
Junior Member
#include <stdio.h>
int main ()
{
int i;
printf("%d" ,i );
}
This is what i got after compileing and rubnning your code:-1073744680
it's probly some junk address somewhere in memory that the compiler spit up.
sincere.
Originally posted here by Phactorial
mathgirl32, why do you keep making yourself look like an idiot? He is not testing us, he is actually asking a very interesting question if you knew atleast half of what you talk about.
harbir: This depends on how the compiler loads int i into memory and how the operating system deals with memory management. On most machines, this will print out what could be considered a kind of "random junk". Since int i will be on the stack (meaning, it will be using memory which was probably used by another program), when you printf %d it would output the value of the stack where int i is.
Well said, I believe you might br correct.
Sincere.
-
November 23rd, 2002, 10:23 PM
#12
It's okay mathgirl, I'll still be your friend. . .he has been posting a lot of stuff like this lately, though.
Every now and then, one of you won't annoy me.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|