Hi, I am using Visual studio 2008. For below code
double main()
{
}
I get error:
error C3874: return type of 'main' should be 'int' instead of 'double'
But if i use below code
char main()
{
}
No errors. After running and exiting the output window displays
The program '[5856] test2.exe: Native' has exited with code -858993664 (0xcccccc00).
Question: Is compiler doing implicit cast from default return value of zero(integer) to char ?
how the code 0xcccccc00 got generated ?
Looks like last byte in that code seem to be the actual returned value. Why 0xcccccc is coming ?