1. Using the operators ++ and --, write statements equivalent to the following statements:
sum = sum + 1;
sum = sum - 1;
2. Two terms used to describe loop mistakes are “off by one” and “infinite loop.” Explain the meaning of these terms and write loops that demonstrate each mistake.
3. What is the scope of a variable?
4. What is a sentinel value, and when should one be used?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here