Advertisement
M4ritimeSeeker

MODULE 4 REVIEW TOPICS

Sep 15th, 2020
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. MODULE 4 TOPICS REVIEW
  2.  
  3. Operators and Operands
  4. • Which of the two (Operands or Operators) are the items being acted on?
  5. • List a few examples of Operators:
  6.  
  7.  
  8.  
  9. • What are the two types of Operators (Hint: It involves how many operands they act on at once):
  10.  
  11.  
  12. • In the following expressions, which operation will occur first? (See Bottom Image for reference, only look for the operators you need to avoid confusion).
  13. o 1 + 3 / 2
  14. o 4 * 22 / 4 + 7
  15. o true && false || false
  16. o (1 / 5) * (4 + 2)
  17.  
  18. • What is the difference between a Prefix and Postfix Unary Operator?
  19.  
  20.  
  21.  
  22.  
  23. Expressions (Division and Modulo)
  24. • What is the result of this expression if the numbers are integers?
  25. o 1 / 2 =
  26.  
  27. • What is the result of this expression if the numbers are doubles or floats?
  28. o 1.0 / 2.0 =
  29.  
  30. • What is the result of this expression if the numbers are integers?
  31. o 20 % 2 =
  32.  
  33. • What happens in this expression if the numbers aren’t integers?
  34. o 20 % 2
  35.  
  36. Type Conversions
  37. • What is the difference between implicit and explicit casting?
  38.  
  39.  
  40. Review Question
  41. • Write a scan statement that will take two integers as input, and put them into variables intNum1 and intNum2.
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement