Question: Select the function definition that does not follow the lab instructions below: Define a function named CoinFlip that returns Heads or Tails according to a
Select the function definition that does not follow the lab instructions below:
Define a function named CoinFlip that returns "Heads" or "Tails" according to a random value or Assume the value represents "Heads" and represents "Tails".
Group of answer choices
string CoinFlipvoid
if rand
return "Heads";
else
return "Tails";
string CoinFlipvoid
string answer;
if rand
answer "Heads";
else
answer "Tails";
return answer;
void CoinFlipvoid
if rand
cout "Heads";
else
cout "Tails";
string CoinFlipvoid
return rand "Heads" : "Tails";
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
