logo

UTK Notes


Clicker Questions - 02-Review

Questions 1 through 5

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
using namespace std;

int main()
{
  int a, b;
  char c, d;

  cin >> a >> b;
  c = 'a' + b;
  d = 'a' + (a-b);

  cout << a % b << endl;
  cout << a / b << endl;
  cout << a << b << endl;
  cout << c << endl;
  cout << d << endl;
  return 0;
}

I compile this program to a.out and then I run it with:

1
UNIX> echo 9 4 | ./a.out

Question 1: What is the first line of output?

Answer 1

Question 2: What is the second line of output?

Answer 2

Question 3: What is the third line of output?

Answer 94

Question 4: What is the fourth line of output?

Answer e

Question 5: What is the fifth line of output?

Answer f

Class Stats, PDF Download