Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4 . [ 2 5 pts . ] Assume that the main function calls SUB 1 function, and parameter passing methods forformal parameters are as

4.[25 pts.] Assume that the main function calls SUB1 function, and parameter passing methods forformal parameters are as follows: a is passed-by-value, b is passed-by-result, c is passed-by-reference,and, finally, d is passed-by-value-result. What is printed when we run this application? Do not justprint the output. Show all the steps of execution.void SUB1(int a, int b, int c, int d){a = a +1;b = a *2;c =5+ b;d = d +3;}void main(void){int w=1;int x=2;int y=3;int z=4;SUB1(w, x, y, z);print (w, x, y, z);}

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_2

Step: 3

blur-text-image_3

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

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions