-
#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.
Quote:
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.
-
It's okay mathgirl, I'll still be your friend. . .he has been posting a lot of stuff like this lately, though.