M4ritimeSeeker

MODULE 4 REVIEW TOPICS

Sep 15th, 2020
110
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.  
  24. Expressions (Division and Modulo)
  25. • What is the result of this expression if the numbers are integers?
  26. o 1 / 2 =
  27.  
  28. • What is the result of this expression if the numbers are doubles or floats?
  29. o 1.0 / 2.0 =
  30.  
  31. • What is the result of this expression if the numbers are integers?
  32. o 20 % 2 =
  33.  
  34. • What happens in this expression if the numbers aren’t integers?
  35. o 20 % 2
  36.  
  37. Type Conversions
  38. • What is the difference between implicit and explicit casting?
  39.  
  40.  
  41. Review Question
  42. • Write a scan statement that will take two integers as input, and put them into variables intNum1 and intNum2.
  43.  
Advertisement
Add Comment
Please, Sign In to add comment