haleygrobertson3828 haleygrobertson3828
  • 11-09-2019
  • Computers and Technology
contestada

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?

Respuesta :

StaceeLichtenstein StaceeLichtenstein
  • 13-09-2019

Answer:

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;

Answer Link

Otras preguntas

what is the part of a 3/4 x 5
The answer I need the answer please help
Name the 2 ions form when water dissociates
Which statement is true? Opinions can be scientifically tested. Scientific theories are absolute and cannot be changed. Scientists have learned all they’ll ever
What percent of 200 is .5?
Sort the visible light colors from the shortest to the longest wavelength.
What is a quick summary for the fairy tail, the golden bird?
The national government wants to increase the number of national parks and recreation areas. How will this act help with the sustainability of our environment?
I don't understand this please help I posted both answer choice and question
What Act was found unconstitutional by the Supreme Court because of the wording of the Fourteenth Amendment?