1.7k views
1 vote
37 ) What is the value of chice after the following statements?

Void getChoice(&choice, count);
{
if(par_ **** < 0)
*par_choice = 0;
if(par_count = 0);
*par_choice = -1;
else
*par_choice = 99;
return;
}

A) 99
B) 0
C)3
D) -1

1 Answer

3 votes

Final answer:

The value of choice will be 99 after executing the function.

Therefore, the correct answer is: option a) 99

Step-by-step explanation:

The given code snippet is defining a function named getChoice, which takes two parameters, choice and count. Inside the function, there are three conditions that determine the value of choice:

If par_**** is less than 0, choice is set to 0.

If par_count is equal to 0, choice is set to -1.

For any other case, choice is set to 99.

Based on the given code, the value of choice will be 99 after executing the function.

User Miahelf
by
8.0k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories