+ 2

Where does the static variables are stored?

3rd Aug 2017, 4:14 PM
Vijay Kumar V H
Vijay Kumar V H - avatar
3 Réponses
+ 2
static variables are stored in the same specific block of memory which is used also for as global variables.This is called rwzi (read,write,zero initialized).
3rd Aug 2017, 4:42 PM
Highman
Highman - avatar
+ 1
in gcc compilator there are two specific section .Data and .Bss for this case.
3rd Aug 2017, 4:46 PM
Highman
Highman - avatar
0
thank you I got it
3rd Aug 2017, 4:56 PM
Vijay Kumar V H
Vijay Kumar V H - avatar