Professional Documents
Culture Documents
Tarea 1 Compiladores
Tarea 1 Compiladores
Tarea 1 Compiladores
int d = 0;
while (x >= y) {
d++;
x = x - y;
return d;
int main () {
int a, b, c;
a = 25;
b = 7;
c = ff(a, b);
What are the values of a, b and c after the code execution in each of the following cases?
A=25 b= 7 c=3
3. Parameter passing is by name. Assume that the return instruction assigns the value of
d to c.
void inc(int x) {
x++;
A=2 b=6 c= 14
A=2 b=3 c= 14
A=2 b=6 c= 14
Problema 3 There are languages, like ADA, that use a call by result and value-result. Describe both
methods of parameter passing and give examples of how they work.