Computer Organization & Architecture In which section of an executable would str
ID: 3583780 • Letter: C
Question
Computer Organization & Architecture
In which section of an executable would string literals most likely be stored?
the stack section
the data section
the heap section
the bss section
the text section
What determines the order in which parameters are pushed onto the stack, where return values are located, and who is responsible for cleanup after a function call?
a. the alignment restrictions of the types of the parameters
the calling convention
the function prototype
the compiler optimization flags
the endianness
In which section of memory would a local variable declared in a C function most likely be stored?
a. the stack section
the data section
the heap section
the bss section
the text section
In x86 assembly, which instruction, or sequence of instructions, causes a C function declared to return “int” to return the value 9?
ret 9
int 9
push 9 ret
mov eax, 9 ret
fld 9 ret
In which section of an executable would a global int variable initially holding the number 6 most likely be stored?
the stack section
the data section
the heap section
the bss section
the text section
In which section of an executable would the machine code making up a function be stored?
the stack section
the data section
the heap section
the bss section
the text section
What is the difference between a 32-bit processor and a 64-bit processor?
64-bit processors can perform more calculations per second (thus making them faster) and a 64-bit processor supports more ram (4gb or higher) whereas a 32-bit processor supports a max 3-4gb of memory.
Explanation / Answer
String literal storage is depends on system and mostly stored in data section
If string is normal array type store in read-write data section
If string is pointer type store in read only data section
The control unit is responsible for the data push to stack and clean up the function call
The endienness is the restricted type on parameter alignment
Local variables store in the stack section
ret 9 return the 9 in the int function
Global initialized variable store in the data section
Machine code stores in the text section
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.