Data segment: Difference between revisions

Content deleted Content added
Line 13:
===Data===
 
[[File:The .data segment contains any global or static variables which have a pre-defined value and can be modified. That is any variables that are not defined within a function (and thus can be accessed from anywhere) or are defined in a function but are defined as ''static'' so they retain their value across subsequent calls. Examples, in C, include:
 
int val = 3;
char string[] = "Hello World";