Question: The language used here is C++ Develop a C program that swaps the values of two variables. Your program should: a) Ask the user to

The language used here is C++

Develop a C program that swaps the values of two variables. Your program should:

a) Ask the user to enter two values, which are stored in a, b.

b) Call a function named swap that swaps the values of a and b. This function has the following prototype

void swap(float *p_a, float *p_b)

**Sample Output: **

Input: 12.84 34.2

Output: a = 34.20, b = 12.84

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 Programming Questions!