does always global variables are initialised to 0?
if not how to initialise an array to zero value in the global..
does always global variables are initialised to 0?
if not how to initialise an array to zero value in the global..
Yes, global variables are initialized to zero (even static variabels).
"No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
"Have you tried turning it off and on again?" - The IT Crowd
Pedantics:
As patil states, global variables and static variables (they are global in all aspects except for where they are visible) are initialized to zero if they are not otherwise initialized.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
then what is the difference between bss and initialised segments?