Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed 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+1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions