Consider the following program written in C pseudocode: int a = 1; /* global */ void foo(int x){ a++; x = x + 2; } void main(){ foo(a); } For each of the following parameter-passing methods, what will...


Consider the following program written in C pseudocode:


int a = 1;    /* global */

void foo(int x){    a++;
x = x + 2; } void main(){    foo(a); }


For each of the following parameter-passing methods, what will be the values ofa andb after running the program?


1)   Passed by value


2)   Passed by reference


3)   Passed by value-result



Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here