1,447 views
0 0 votes

2 Answers

0 0 votes
The correct answer is 2,2

Even though activation record deletion deletes j variable, since we've already stored the memory location (address of j) in p variable of main, it's accessible even after deletion of activation record. Suggestions/improvements are welcomed
0 0 votes
it should give compilation  error because function "foo" is not declared before its use.
 so option c is correct
Position:
Show:

Related questions

0 0 votes
1 1 answer
1.0k
1.0k views
ranarajesh495 asked Oct 9, 2018
1,010 views
If we are taking character as input then how we can check the character against a a range of numbers. Please explain
0 0 votes
1 1 answer
1.3k
1.3k views
Nitesh Choudhary asked Jun 6, 2017
1,319 views
"Pointer arguments enable a function to access and change objects in the function that called it. As an example, consider a function getint that performs free-formatinput...
0 0 votes
0 0 answers
3.0k
3.0k views
sam.mavux asked Oct 12, 2018
3,046 views
What is the output of this C code? Please explain what is happening at line no. 12#include <stdio.h>int main(){int i = 97, *p = &i;foo(&p);printf("%d ", *p);return 0;}voi...
7 7 votes
1 1 answer
218
218 views
GO Classes asked Jun 6
218 views
What is the output of the following code?#include <stdio.h void change(int *p, int *q) { *p = *p + 4; *q = *p + *q; p = q; *p = *p - 3; } int main() { int a = 6, b = 10; ...