Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote