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)
saved_yes
(no) 
low-level

Mark the syntax correct and incorrect variable definition statements.
(yes)
int p = 22;
(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) 
cout >> dimes;

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 = 2*n + 3;
(no) 
int n = x * 100;

Mark the syntax correct and incorrect arithmetic expressions. All names are variables of type
int.
(yes)
nik + 1
(no)
%beta % 2

Mark the syntax correct and incorrect arithmetic expressions. All symbolic names denote
double type variables.
(yes)
s21 + t20 / 5
(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)
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 in C++ and mark with "yes'' these, which have value 9 (integer number) or 9.0 (floating point number).
(yes)
a2/k
(no) 
a1 - k

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

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

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

We have the following variable definitions:
    string n = "XYZ";
    string m = "33";

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

Is the following relation true?
(yes) "Harry" < "Hurry"
(no)  8 < -5

Mark the syntax correct/incorrect C++ statements. Assume that mark is an integer variable.
(yes) if (mark == 1) mark++;
(no) if [mark == 0] mark--;