The questions of Test_2

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

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

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

Mark the correct/incorrect assertions about functions.
(no)  Each function receives input parameters only from number types.
(yes) Functions need to be defined before they can be used.

We have the following function declaration:
    int test(int n, int& m);
Mark the correct/incorrect statements. We suppose that an integer variable ind is defined and its initial value is 0.
(yes) cout << test(10, ind);
(no)  cout << test(ind, 2);

We have the following function definition:
    int mod3(int n)
    { if (n % 3 > 1) return n;
      else           return n + 1;
Does the statement prints out an even number?
(no)  cout << mod3(0);
(yes) cout << mod3(1);

Mark with "yes'' the statements in which the loop body executes exactly once. An integer variable ah has value 0.
(no) while (math > 0) math++;
(yes) while (math <= 0) math++;

Mark with "yes'' the program code excerpt where the body of the loop statement executes 3 times
(yes) i=1; while(i<4) i++;
(no)  i=1; while(i<=4) i++;

Mark the correct/incorrect assertions about classes.
(yes) A constructor always has the same name as the class name.
(no) The main function can access directly the private data fields of a class.

Mark with "yes'' a function declaration which can be used as a constructor of a class. (Remember that the constructor name coincides with the class name.)
(yes) Point(double x, double y);
(no)  int Time();

We have a class:
class Product {
Product(string n, double p, int s);
void read();
string get_name() const;
double get_price() const;
void print() const;
string name;
double price;
int score;
and an object p of this class, constructed in main function. Mark the correct/incorrect statements in the body of main function.
(yes) Product p22;

(no)  cout <<;