Question 23 If you wanted to allocate a struct that will be modified by various non-nested functions, where can you stor
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Question 23 If you wanted to allocate a struct that will be modified by various non-nested functions, where can you stor
Question 23 If you wanted to allocate a struct that will be modified by various non-nested functions, where can you store the struct? Select all that apply. Below is pseudo-code that shows an example of non-nested function calls: vald Add(truct MV STRUCT 7 does something to a vald (struct MV_STRUCT E) 77 do thing int mat Sunfär return Stack frame of main stack frame of a function that modifies the struct like Add or Sub The heap Code section text section Question 24 Consider the following code segment: voud Add(trust MY STRUCT //does something to s is a pounter to a structY STRUCT www cars MY STRUCT") does something to s A(); structe si cresteriet) Create and initializes pointer to a STRUCT called a return s Int () struct NY STRUCT=Create(); return 0; Where can the create() function allocate the MY STRUCT? The Heap Stack frame of min Stack frame of Create Stack frame of Sub) Stack frame of Add 1 pts 1 pts