Interactive Quiz for Chapter 4

Question
Your Answer Result/Explanation
4.1
Write an expression that returns the sine of angle degree 36.5 using the sin function.
4.2
Write an expression that returns the logarithm of 290.
4.3
What is round(5.4)?
4.4
What is a literal for character A?
4.5
What is the string literal that consists of a single character A?
4.6
Write an expression that returns a lowercase letter for a character ch.
4.7
Write an expression that tests whether a character ch is a letter.
4.8
Write an expression that returns the length of a string s.
4.9
Write an expression that returns the first character in string s.
4.10
Assume x is "ABC" and y is "ABD", what is x == y?
4.11
What is the output of the following code?
  double x = 3.503;
  double y = 4.355;
  cout << setprecision(2) << fixed << setw(6) << left << x;
  cout << setw(6) << y << endl;
                  
4.12
Write a statement that creates an output object named out for file t.txt.
4.13
Write a statement that creates an input object named in for file t.txt.