The questions of Test_1

with two model answers - one correct (yes) and one incorrect (no)

Mark the correct and incorrect assertions about computers and programming.
(yes) The primary RAM storage loses all its data when the power is turned off.
(no)  The hard disk storage loses all its data when the power is turned off.

Mark the valid and invalid variable names.
(yes)
sale
(no) 
that-name

Mark the correct and incorrect variable definition statements.
(yes)
int pen = 8;
(no) 
pennies = 3;

Mark the correct and incorrect input and output statements. Suppose that all variables used in the expressions, are defined and initialized properly.
(yes)
cout << "C++\n";
(no)  cout >> k;

Mark the correct and incorrect assignment statements. Suppose that: the variables
k, count and n have int type; the variables total and x have double type; the variables sub and s have string type.
(yes)
k = k + 1;
(no)  int n = x * 100;

Mark the syntax correct and incorrect arithmetic expressions. All variables have
int type.
(yes)
h + 1
(no) %h - 2

Mark the syntax correct and incorrect arithmetic expressions. All variables have
double type.
(yes)
s + t20 / 2
(no) s % t + 1

We have the following variable definitions:
    int k = 2;
    double x = 0.5;

Calculate the arithmetic expressions and mark with "yes'' these, which have values 10 (as an integer number or a floating point number).
(yes)
20 * x
(no)  8 * x + k

We have the following variable definitions:
    int a1 = 21;
    int a2 = 81;
    int k = 9;

Calculate the arithmetic expressions and mark with "yes'' these, which have values 9 (as an integer number or a floating point number).
(yes)
a2/k
(no) 
a1 - k

Mark the arithmetic expressions which have
double type of the result. The following variable definitions are given:
    int j = 25;
    double z = 3.75;

(yes)
z + j/2
(no)
j%4 + 121

Mark the correct definitions of the string variable
name. The variable pname is already defined and has a value "ABCDEF".
(yes)
string name = "Ivan";
(no) 
string name = 5;

We have the following variable definitions:
    string n = "123";
    string m = "ABCD";

Mark the syntax correct and incorrect statements.
(yes)
cout << n.substr(0,2);
(no) 
cout << length(m);

Mark the correct and incorrect statements about the class
Time and an object t of this class.
(yes)
Time day_begin(0,0,1);
(no) 
cout << t.get_minutes(t);

Mark the correct and incorrect statements about the class
Employee and an object harry of this class.
(yes)
harry.set_salary(4000);
(no) 
cin >> harry.set_salary();