christianbabona christianbabona
  • 19-03-2017
  • Computers and Technology
contestada

If num is an int which expression always evaluates to true if num holds an odd number

1) Num%2==0
2)Num%2 <0
3)Num%2==1
4)Num/2==1

Respuesta :

xjkbel
xjkbel xjkbel
  • 20-03-2017

The answer is 2) Num%2==1.
The modulus operator (%) divides the left hand side by the right hand side and returns the remainder.

Examples:
3%2=1 : 2 goes into 3 once, with 1 remaining.

5%2 =1 :  2 goes into 5 twice, with 1 remaining.

11%2 =1 :  2 goes into 11 five times, with 1 remaining.

Answer Link

Otras preguntas

What happens with rotational symmetry?
A main reason that the industrial revolution started in England was the availability of which natural resource? a. Coal b. Gold c. Oil d. Marble
Drag the tiles to the correct boxes to complete the pairs. Match each scatter plot with the description of its association.
Which is the best example of a word with a negative connotation? sunlit desolate justice rise
uh... can you help me with this all? or you can only the one you know.​
How did advances in physics and chemistry dramatically change manufacturing? A. made large multinational companies possible B. employed fewer workers C. created
What kind of prescription does a doctor provide a patient on a preprinted form? a. verbal b. computerized c. electronic d. written
NO LINKS!!! Exponential Growth and Decay Part 4​
In the case of predatory pricing schemes, who is the prey? OA. the wholesalers OB. the competitors OC. the distributors OD. the regulators
can you please help I pay you £50