josephcfaucett4975 josephcfaucett4975
  • 12-07-2021
  • Computers and Technology
contestada

Given the snippet of code: int x = 5; int bar(int j) { int *k = 0, m = 5; k = &m; return (j+m); } void main(void) { static int i =0; i++; i = bar(i) + x; } Which variables obtain their memory from the stack? A. iB. jC. kD. mE. x

Respuesta :

qmqqvn2vmm qmqqvn2vmm
  • 12-07-2021

Answer:

Variables j , k , m will be stored in the stack.

Explanation:

Variable x will not be in stack as is it a global variable.

Variable i will not be in stack as is it a static variable.

Variable j will be in stack as is it a local variable in the function.

Variable m will be in stack as is it a local variable in the function.

Variable k , a pointer will be in stack as it is in the function bar locally.

Answer Link

Otras preguntas

I need help please!!!!!
Please help me on this!!
Which formula would be used to find the measure of angle 1? One-half(a° b°). One-half(a° – c°). One-half(b° c°). One-half(a° – b°).
Name any 2 vaccinations given to prevent three diseases.
3. A fourth-degree polynomial equation is shown below. Y= x^4 – 10x^2 + 9 Use this problem to complete the following questions. 1) Write the equation in factore
Which is the seventh month?
What is the solution to the system of equations that Darren graphed? make sure you write the solution as an (x,y) ordered pair.
what impact might the consequences of addictions have on encouraging someone to get support?
I need help immanently this is over due
Describe tu instituto answer in Spanish Please actually answer don’t just answer to get points i am really struggling