Problem 5 Consider Following Program Written C Like Syntax Void Fun Int First Int Second F Q43883330


Problem 5. Consider the following program written in a C-like syntax: void fun(int first, int second) f first += first; second += second; void main() f int list[2] = f1, 3g; fun(list[O], list[1]); For each of the following parameter passing methods, what are the values of the list array after execution? a. Passed by value b. Passed by reference Problem 6. Describe, in English, the language defined by the following grammar <S> ! <A> ! <B> ! <C> ! <A><B><C> <A> la <B> 1 b c<C> 1 C Show transcribed image text Problem 5. Consider the following program written in a C-like syntax: void fun(int first, int second) f first += first; second += second; void main() f int list[2] = f1, 3g; fun(list[O], list[1]); For each of the following parameter passing methods, what are the values of the list array after execution? a. Passed by value b. Passed by reference
Problem 6. Describe, in English, the language defined by the following grammar ! ! ! ! la 1 b c 1 C
Expert Answer
Answer to Problem 5. Consider the following program written in a C-like syntax: void fun(int first, int second) f first += first; …
OR