Name_______________________
Login___________________SID________
CS 010: Introduction to
Computer Science I
int a = 28;
int b = 19;
int c = 3;
int d = 2;
cout << a % b % c / d;
int a = 9;
int b = 6;
double c = 2.2;
cout << 4.4 + c * (a / b);
string fun = “I love C++”;
cout << fun.length();
cout << str.substr(1, 1) + str.substr(9, 2);
double x = 1.0;
double y = 777.777;
cout << fixed << setprecision(2) << setw(8);
cout << x << “\n”;
cout << y << “\n”;
a. ----1.00
777.78
b.
-------1
777.78
c.
----1.00
--777.78
d.
----1.00
777.777
e.
None
of the above
Circle c(Point(-1, 2), 4);
c.move(3, 2);
Time morning(7, 0, 0);
cout << Time.get_hours();
Line 1 Point p(0,0);
Line 2 Point q(3,3);
Line 3 Line stick(p, q);
Line 4 cwin << get_start();
Point p(2,4);
Line s(p, Point(4, 4);
cwin << s;
p.move(0,2);
Point q = p;
q.move(0, -4);
cwin << Line(p, q);
p.move(2, 0);
q.move(2, 0);
cwin << Line(p, q);
a.
U
b.
T
c. H
d.
E
e.
None
of the above