Question: Ex 3. Pass-by-Reference (20 points) Create a file named ex3.cpp and add your name and ID at the top of the file as a comment

Ex 3. Pass-by-Reference (20 points) Create a file named ex3.cpp and add your name and ID at the top of the file as a comment Implement a function named generate that receives four integers by reference and stores in them four unique random integers in the range [0, 5]. Write a simple program to test your function. Assume the four digits are called a, b, c and d. You can use the following algorithm Generate the first random digit and assign it to a. Generate another random digit and assign it to b. If b is the same as a, then keep generating new random digits until a new unique number is generated. Assign this number to b
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
