Question: 1.A throw block is where A) an exception may be thrown B) where execution continues after an exception C) a catch takes place D) an

1.A throw block is where

A) an exception may be thrown

B) where execution continues after an exception

C) a catch takes place

D) an exception is handled

2.Which function declaration passes a pointer as a parameter?

A)void func1(int piVal, double *pdVal);

B)double func4(int &piVal, double &pdVal);

C)void func2(int &piVal, double pdVal);

D)int* func3(int piVal, double pdVal);

3. In which area of memory are dynamic variables located?

A)Heap

B)Stack

C)Code

D)None listed

4.which of these declares a function pointer?

A)int (*calc)();

B)int *calc();

C)int *pt[3];

D)int &pt=num;

5.A string function that returns a boolean value is

A)empty()

B)find()

C)at()

D)compare()

6.Function members of a class gain access to the calling object's members by

A) a pointer to the calling object that is implicitly provided by the compiler. The name if this pointer is this. The members are prefixed implicitly by this-> as in this->membername

B)a variable called self that is an alias for the calling object. This self is used to access the members of the object as in self.membername

C)there is no particular mechanism, the variables just know what the calling object is and automatically refer to the calling object

D)None of the above

7.Which statement invokes the constructor for class Complex?

A)Complex a;

B)Complex a, b(6.8, 9.7);

C)All listed

D)Complex b(6.8, 9.7);

8.Which function declaration is NOT accepting an array of ints as a parameter?

A)int findMax(int &vals, int size);

B)int findMax(int vals[], int size);

C)int findMax(int *vals, int size);

D)int findMax(int **vals, int size);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!