74.7k views
3 votes
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?

User Jendrusk
by
8.5k points

1 Answer

1 vote

Answer:

The correct answer for the given question is "2"

Step-by-step 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;

User Mttr
by
7.9k points

No related questions found