806 views
0 votes
0 votes

2 Answers

0 votes
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 votes
0 votes
it should give compilation  error because function "foo" is not declared before its use.
 so option c is correct

Related questions

629
views
1 answers
0 votes
ranarajesh495 asked Oct 9, 2018
629 views
If we are taking character as input then how we can check the character against a a range of numbers. Please explain
933
views
1 answers
0 votes
Nitesh Choudhary asked Jun 6, 2017
933 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...
2.6k
views
0 answers
0 votes
sam.mavux asked Oct 12, 2018
2,643 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...
672
views
3 answers
2 votes
Shivani gaikawad asked May 3, 2018
672 views
what will be output printed?