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

please rate i'm taking part in a drawing competition :)which one is good?(little prank)​
Another problem please look!
STATISTICS HELP PLEASE #4
Neeed Helppp plzzz !
Write an algebraic expression for the word phrase The product of 6 and t divided by 7
3. Which of the following describes the author's main purpose in the text?
Which of the following statements is true? An important part of analyzing a text is offering your own opinion about how successful the text is and reasons for t
Please help me I need it done
What did Rome and Han China share
100 points n brainly if answered right Read and choose the option with the correct verbs to complete the sentences. Pay attention to use gusta and/or gustan cor