bbb6.jpg

Back 

Common operations on numeric and Boolean data questions

Q1. What does ‘result’ hold when firstnumber = 10 and secondnumber = 5?

  1. result = firstnumber + secondnumber
  2. result = firstnumber - secondnumber
  3. result = firstnumber * secondnumber
  4. result = firstnumber / secondnumber

Q2. What is the overall result of the following statements:

  1. (Britain is a country) AND (You can write with a pen)
  2. (The sky is below the ground) OR (You can walk on the ground)
  3. (Paris is the capital of Germany) OR (London is the capital of France)
  4. ((Sheep have two legs) OR (Cows go Moo)) AND (Wheat grows in fields)
  5. ((6 is a real number) OR (6.0 is an Integer)) AND (g is NOT an Integer) 

Q3. When you have complex expressions that use brackets, OR, AND and NOT, there is an order of precedence. What is the order of precedence for these four operators?

Back