Latest Answer : Optimize the below for time:int i;if i=0 then i:=1;if i=1 then i:it is the question i want to know the answer. ...
Optimize the below for time:
int i;
if i=0 then i:=1;
if i=1 then i:=0;
(given that i can take only two values (1,0))
Optimize the below for time:
int i;
if i=0 then i:=1;
else if i=1 then i:=0;
(given that i can take only two values (1,0))
In the following question answer A, B, C, D depending on when the errors are detected?
Array overbound
A. if no error is detected
B. if semantic and syntactic checking
C. if during Code generation & Symbol allocation
D. run time
In the following question answer A, B, C, D depending on when the errors are detected?
Undeclared identifier
A. if no error is detected
B. if semantic and syntactic checking
C. if during Code generation & Symbol allocation
D. run time
In the following question answer A, B, C, D depending on when the errors are detected?
Stack underflow
A. if no error is detected
B. if semantic and syntactic checking
C. if during Code generation & Symbol allocation
D. run time
In the following question answer A, B, C, D depending on when the errors are detected?
Accessing an illegal memory location
A. if no error is detected
B. if semantic and syntactic checking
C. if during Code generation & Symbol allocation
D. run time
Understand the fundamental of incrementing a variable using val++ and ++val. Some programs are given for error correction.
A question on call by value,
call by name,
call by reference.
f(x,y,z)
{
y := y+1;
z := z+x;
}
main()
{
int a,b;
a := 2
b := 2;
f(a+b,a,a);
print a;
}
What is the value of a printed for three different calls in main?
What is the essential requirement for a real-time systems
A. pre-emption
B. virtual memory
C. paging etc