Recent questions tagged runtime-environment

394
views
1 answers
0 votes
322
views
1 answers
1 votes
main() { int xyz; st1; st2(); f(); g(); h(); st3; ) how many stack entry required??ans is 2 why??
2.6k
views
1 answers
0 votes
In an absolute loading scheme which loader function is accomplished by assembler ?(A) re-allocation(B) allocation(C) linking(D) loading
4.7k
views
1 answers
2 votes
Q. Which of the following parameter is not included in the activation record of recursive function call?1.Local variables of function2.Return value of function3. Global variables of program4.Access link
3.6k
views
1 answers
3 votes
Can anybody explain me access link and control link in activation record?I am confused what is different between themIF POSSIBLE GIVE EXAMPLE ALSO THANKS A LOT
1.0k
views
1 answers
0 votes
How storage mapping is done by compilers ?Even though actual loading of program in memory is done by loader.PS: This is the exact question as given in book, but i think it is memory mapping ?
718
views
1 answers
3 votes
Consider the following statements:$S_1$: An increase in the number of page frames allotted to a process always increases the page fault rate in $\text{FIFO}$ page replacement ... $S_1$Only $S_2$Both $S_1$ and $S_2$ Neither $S_1$ nor $S_2$
473
views
1 answers
4 votes
Consider the following statements :$S1$: Automatic garbage collection is not essential to implement recursion.$S2$: Operator precedence parser falls under the category of top down parsers.$S3$: ... S1$ & $S3$S1$ & $S2$S2$ & $S3$S1$ & $S4$
7.3k
views
3 answers
5 votes
We use malloc and calloc for:Dynamic memory allocationStatic memory allocationBoth dynamic memory allocation and static memory allocationNone of these
547
views
1 answers
5 votes
Consider the following code snippet.void first(int p, int t) { p += t; t += p; } main() { int p = 4; first(p , p); }What is the final value of $p$ in both call by value and ... $12$ $5$ and $12$ $12$ and $16$ $4$ and $16$
1.6k
views
1 answers
0 votes
Activation Record can be known atA. Compile TimeB. Run TimeC. Loading TimeD. None of these
1.5k
views
2 answers
4 votes
Consider following recursive functions:function fib(n : integer); integer begin if (n = 0) or (n = 1) then fib = 1 else fib = fib(n-l) + fib(n-2) ... $n = 10$ without overflowing the stack. Then the size of the stack is ______ $Bytes$.
1.7k
views
2 answers
8 votes
Consider the following program fragment :int foo(int ,int ); int a; int ar[4] = { 1,0, 2,3}; main() { a = 0; foo(ar[a], ar[ar[a]]); printf("%d,%d ,%d,%d ", ar[0] , ar[1] ... $3, 50, 2, 3$3, 50, 3, 4$3, 2, 2, 3$
1.6k
views
4 answers
2 votes
Consider the following two statements$:$ $S_{1}:$ Activation records can have a permanent lifetime in case of static allocation.$S_{2}:$ Activation records can ... $S_{2}$ respectivelyTrue, True True, False False, True False, False
1.8k
views
1 answers
5 votes
Consider the procedure declaration:Procedure P (k: integer)where the parameter passing mechanism is call-by-value-result. Is it correct if the call, P (A ... z;Explain your answer. If this is incorrect implementation, suggest a correct one.
2.4k
views
1 answers
19 votes
What is printed by following program, assuming call-by reference method of passing parameters for all variables in the parameter list of procedure P?program Main(inout, output); var a, b:integer; ... a:=2; b:=3; p(a+b, a, a); Write(a) end.
6.4k
views
4 answers
18 votes
Consider the following program skeleton and below figure which shows activation records of procedures involved in the calling sequence. ... r end q; procedure s; begin q end s; begin s end p;
471
views
1 answers
0 votes
Consider the following statements:S1: When you statically link a file into an executable, the contents of the file are included during link time.S2: When you ... contents of said file are loaded.Which of the above statements is/are true?
1.4k
views
1 answers
3 votes
Will recursion work correctly in a language with static allocation of all variables? Explain.
994
views
4 answers
2 votes
1.7k
views
1 answers
5 votes
Indicate the result of the following program if the language uses (i) static scope rules and (ii) dynamic scope rules.var x, y:integer; procedure A (var z:integer); var x:integer; ... begin x:=x+1 end; begin x:=5; A(y); write (y) ...end.
255
views
1 answers
3 votes
The language which supports _______ needs heap allocation in the runtime environment.Dynamic Data Structure Static Scoping Global Variable Recursion
1.9k
views
2 answers
4 votes
What does the following program output?program module (input, output); var a:array [1...5] of integer; i, j: integer; procedure unknown (var b: integer, var c: integer); var i:integer; ... (a[i], a[j]); for i:=1 to 5 do write (a[i]); end;
4.4k
views
2 answers
17 votes
State whether the following statements are TRUE or FALSE with reason:The Link-load-and-go loading scheme required less storage space than the link-and-go loading scheme.
1.6k
views
1 answers
1 votes
8.6k
views
3 answers
17 votes
425
views
1 answers
1 votes
I searched a lot and tried understanding access link in activation record, but didn't get very far. Please explain?Access link points to activation record associated with nearest enclosing scope of program. What does it mean?