View Single Post
Old Jun 27th, 2007, 10:13 PM   #3
Darkhack
Hobbyist Programmer
 
Darkhack's Avatar
 
Join Date: Dec 2005
Location: Kansas City
Posts: 105
Rep Power: 3 Darkhack is on a distinguished road
Send a message via AIM to Darkhack
I do not think that is quite right. My reasoning is because the following program will display the number three just fine. Compiler doesn't show any warnings and it executes perfectly and displays the number, even though I am initilizing it without pointing to an existing variable.

int main()
{
    int *x = (int *)3;
    
    printf("%d\n", x);
    
    return 0;
}
Darkhack is offline   Reply With Quote