Ask Question

What is the value of choice after the following statements? void getChoice (int& par_choice, int par_count); int choice, count = 3; getChoice (choice, count); void getChoice (int& par_choice, int par_count) { if (par_count <0) par_choice = 0; if (par_count = 0) par_choice = - 1; else par_choice = 99; return; }

+4
Answers (1)
  1. 9 August, 22:17
    0
    In every programming language the return type of the function is must but here in the given code the return type for the following function is not given so this program will cause a syntax error that no return type is defined for the function getchoice.

    getChoice (choice, count);

    it should be like:

    returntype getchoice (params);
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is the value of choice after the following statements? void getChoice (int& par_choice, int par_count); int choice, count = 3; ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers