The questions of Test_1

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

Mark the correct and incorrect assertions about computers and programming.
(yes) Assembler is processor dependent low-level language.
(no)  Logic errors cause an interrupt in the compilation process.
 
Mark the valid and invalid variable names (identifiers in C++).
(yes)
yes
(no) 
low-level

Mark the syntax correct and incorrect variable definition statements.
(yes)
int primes = 2;
(no) 
dimes = 1;

Mark the correct and incorrect input and output statements. Suppose that all variables used in the expressions are defined and initialized properly.
(yes)
cout << "Hello\n";
(no) 
cin << d;

Mark the correct and incorrect assignment statements. 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 = 10 - 4*num;
(no) 
int m = n * 100;

Mark the syntax correct and incorrect arithmetic expressions. All names are variables of type
int.
(yes)
cents + 100/counts
(no) 
\beta % 2

Mark the syntax correct and incorrect arithmetic expressions. All symbolic names denote
double type variables.
(yes)
x * t / 55
(no) 
2 * t % (t + 1 )

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

Calculate the arithmetic expressions
in C++ and mark with "yes'' these, which have value 10 (integer number) or 10.0 (floating point number).
(yes)
10 * x + 5
(no)  
k / k + 4 * x

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

Calculate the arithmetic expressions in C++ and mark with "yes'' these, which have value 9 (integer number) or 9.0 (floating point number).
(yes)
(a2 + 1)/k
(no) 
k / a2

Mark the arithmetic expressions which have
double type of the result using the following variable definitions:
    int j = 22;
    double z = 1.75;

(yes)
z*2 + j/10
(no)
63 - j%5

Are the given below statements definitions of a string variable
name? The variable pname is already defined and has a value "MY".
(yes)
string name = "Sonja";
(no) 
string name = 123;

We have the following variable definitions:
    string n = "NIK";
    string m = "101";

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 the already defined object t of this class.
(yes)
Time end_day(1,0,1);
(no) 
cout << get_hours(t);

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

Mark the correct and incorrect assertions about output formatting.
(yes) The
setprecision() manipulator is used to set the precision of the next floating point number.
(no)  The
setw() manipulator sets the number of digits in the next output.