Question: Exercise 1 - Passing variables By Reference Calling By Reference) (2 marks) Exercise Objectives Declaring pointer variables Assigning pointer variables with references Accessing values using

 Exercise 1 - Passing variables By Reference Calling By Reference) (2

Exercise 1 - Passing variables By Reference Calling By Reference) (2 marks) Exercise Objectives Declaring pointer variables Assigning pointer variables with references Accessing values using pointers Passing variables by reference Calling functions by references Using references to allow functions to return many values (in/out variables) Problem Description Open replit.com IDE, create a new repl (project) and name it "Lab11Ex1". Use this project to write and run a C program that performs the following: Declare the following functions as prototype and implement them after the main function BySNums(), a function that receives two real (float) pointers a, b, and multiply the first number by 5 and divide the second by them (Note: Don't print values in the function] CircleCalc(), a function that receives one real number(radius of a circle)r, and the area and the circumference of a circle [Hint: Your function prototype should be like this: void CircleCalc (float r, float area, float cir); In the main function declare two real (float) numbers: x and y, and prompt the user to read both of them, then call the functions declared above as follows: Call By Nums () by passing the addresses of x and y Call CircleCalc() function for x and y [Declare 2 float variables area, cir to be passed as references in order to hold the area and the circumference values. I Organize the output to appear as shown in the sample output below Download your project as zip file and keep it within your file system (Desktop for example) Upload the project to the elearning platform Sample Output Input the value of x 7 7 mutilply by 5 = 35 7 divided by 5 = 1.4 Enter the circle radius 3 The area is : 28.26 The circumference is: 18.48

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!