Qualcomm Interview Question
Software Engineer / DevelopersData segment where Global variable also stores.Thats y its value lasts. The only difference b/w global and static is scope of variable.
If we declare a variable as a both global and static , then no difference in that file but other files can not access global varibal which declared in the following way:
static int ii;
int main()
{
....
}
Static variables initialized to zero go in the BSS segment, otherwise they go in the DATA segment.
data segment
- Anonymous January 15, 2009