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

Cumulus and stratus clouds belong to which cloud group?
In the mid-1300's, Mansa Musa created a strong centralized Islamic government in
How could the loss of biodiversity affect humans?
40+40x0+1=What is the correct answer?
A ball is thrown from an initial height of 2 feet with an initial upward velocity of 29 ft/s. The ball's height h (in feet) after t seconds is given by the f
One of the Patriots' greatest strengths was their
Deciduous forests can only be found in North America. True Or false? Please explai
General Grant's army came closest to defeat in the West as a result of a surprise Confederate attack at the Battle of
Which object is a system made up of subsystems A. Mineral B. Rock C. Earth D. Box
The active sections that are located along fault lines are called