Answered step by step
Verified Expert Solution
Question
1 Approved Answer
LAST DGT 12 Q3. (24 pts) You are going to assign the last 2 digits of your student number into the variable Lz0. Answer the
LAST DGT 12
Q3. (24 pts) You are going to assign the last 2 digits of your student number into the variable Lz0. Answer the following questions related with parameter passing. L.2D = _ // Your last 2 digits a) What number will the following program print if parameters are passed by reference? int i= L2D; f(i,i); print (i); void f( int x, int y) ( x++; y++; b) What number will the following program print if parameters are passed by value-result? int i=L2D; int j=L2D+2; f(i,j); print (i+j); void f( int x, int y) x++; y++ c) What number will the following program print if parameters are passed by value? int 1=L2D+40 : f(1); print (i); void f( int x) i x++; d) What number will the following program print if parameters are passed by name? int a [2]=([2D,11); int i=0; f(a[i],i); print (i,a[0],a[1]); void fint x, int k)1 k=1; x=x+1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started