The one I chose seems to be wrong. Please be careful when finding the answer Que
ID: 3721933 • Letter: T
Question
The one I chose seems to be wrong. Please be careful when finding the answer
Question 7 1 pts Consider the following code #include #include int a 32 ; int b; int funcCint arg) static int tmp = 0; tmp++ return tmp; int main(int argc, char targvL]) int *p = malloc(sizeof(int)); *p = 43 ; char *str "Where am I?"; printf("%s ", str); return 0; Where are tmp and b stored in the program's virtual address space? Code (read only data), Data (uninitialized) Data (initialized), Data (initialized) Data (uninitialized), Data (initialized) Data (initialized), Data (uninitialized) Data (uninitialized), Data (uninitialized)Explanation / Answer
ANSWER:-
OPTION (D) Data (intialized),Data(uninitialized)
Explanation:- Initialized data segment, usually called simply the Data Segment. A data segment is a portion of virtual address space of a program, which contains the global variables and static variables that are initialized by the programmer.
uninitialized data, is usually adjacent to the data segment. The BSS segment contains all global variables and static variables that are initialized to zero or do not have explicit initialization in source code.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.