pass by value and pass by reference c programming

nellie22980

Commendable
Oct 13, 2016
1
0
1,510
Use this main() and complete the program. You will need to add two functions.

int main()
{
int i = 1, j = 1;
printf("Before the call to incrementByValue(): i = %d\n",i);
incrementByValue(i);
printf("After the call to incrementByValue(): i = %d\n",i);

printf("Before the call to incrementByReference(): j = %d\n",j);
incrementByReference( ? ); // you figure it out
printf("After the call to incrementByReference(): j = %d\n",j);
return 0;
}

Your program should produce this output:

Before the call to incrementByValue(): i = 1
Inside incrementByValue(): 2
After the call to incrementByValue(): i = 1
Before the call to incrementByReference(): j = 1
Inside incrementByReference(): 2
After the call to incrementByReference(): j = 2

I just can't figure out how to get started.I need help and it is due today 10/13/16 at 6:45pm est time.