Back 

Operators, strings and codes questions

Q1. Give the answers to the following: a) 10 mod 4     b) 15 mod 5     c) 7 mod 6     d) 12 mod 20
Q2. Give the answers to the following: a) 3 DIV 1     b) 10 DIV 5     c) 20 DIV 15     d) 20 DIV 5
Q3. Give the answer to the following: a) 4 + 2 * 2      b) 20 - 5 / 5     c) (20 + 10) * 2
Q4. A Boolean expression is made up of an OR, an AND and a NOT operator. State what in order you should evaluate the operators.
Q5. What is meant by 'initialising a variable'?
Q6. Why do variables been to be declared?
Q7. Describe in general terms how the ASCII table is organised by saying what the order of the following is:

    • capital letters
    • small letters
    • full stops and commas
    • digits

Q8. What is the ASCII code for a) null?     b) space?     c) capital A?
Q9. Explain why Ben comes before Benny when comparing strings.
Q10. Apart from ASCII, state two characters sets used in computing. 

Back