Ask Question

In the C+ + instruction, cookies = number % children; given the following declaration statement: int number = 38, children = 4, cookies; what is the value of cookies after the execution of the statement?

+5
Answers (1)
  1. 13 July, 10:18
    0
    The correct answer for the given question is "2"

    Explanation:

    Here the statement is cookies = number % children; where number and children are the integer type variable which has been initialized by 38 and 4 respectively as given in the question.

    It will give value of cookies=2 because the % operator gives reminder so 38%4 gives reminder 2.

    Therefore the value of cookies=2;
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “In the C+ + instruction, cookies = number % children; given the following declaration statement: int number = 38, children = 4, cookies; ...” 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