Question: C + + Defining functions with reference parameters. Assignment: Write the definition of a void function named toggleFlag that has one parameter, a bool reference

C++
Defining functions with reference parameters.
Assignment: Write the definition of a void function named toggleFlag that has one parameter, a bool reference variable named flag. The function should toggle the state of flag: if true, make it false; if false, make it true. The function returns nothing.
Note: You will need to write the function definition according to the type specifications.

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!