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

In what way does your family most influence the development of chronic disease
In the game Contra, what does the capsule with the F on it represent?
A ramp is designed with the profile of a right triangle. the measure of one acute angle is 2 times the measure of the other acute angle. find the measure of eac
Why didn’t Lincoln free all the slaves in the United States?
I need help on this question
Which statement best explains how farming affected the economic slowdown that led to the Great Depression? High demand was met with high output. Produce prices
Which statement describes a key difference between Nelson Mandela's movement in South Africa and the independence movement in Algeria? A. Mandela's movement was
Someone please help me with this
Graph y ≥ -x2 + 1. Please include picture of graph in your answer.
Which author was inspired by the Napoleonic Wars? Leo Tolstoy Albert Camus Franz Kafka Jean-Paul Sartre