Chat with us, powered by LiveChat MAC 102-Which statement is incorrect | Writedemy

MAC 102-Which statement is incorrect

MAC 102-Which statement is incorrect

Question

1)Which statement is incorrect?

A)Any use of the keyword const is a promise to the compiler, and a request to the compiler to enforce the promise

B)The functions or data members declared in the private: section of a class can be accessed only in the definition of those functions declared in that class

C)A class may not have another class type object as a member.

D)The keyword static is used in a static function declaration in a class but not in the function definition

2)Which statement is incorrect?

A)If we use an out of range index with an array, there will NOT be an error message from the compiler.

B)A static variable of a class can be changed.

C)If we use an out of range index with a vector, there will NOT be an error message from the compiler.

D)Inline functions are always more efficient than noninline functions

3)Which of the following is NOT a legal access to the class or struct members? Assume each is outside of the class member definitions,

struct S class C class D

{ { {

int x; int x; public:

int y; int y; int x;

} private: int y;

S s; int z; private:

}; int z;

C c; };

D d;

A)d.x

B)s.x

C)d.y

D)c.x

4)Consider the class inheritance.

class B{

public:

B();

B(int nn);

void f();

void g();

private:

int n;

};

class D: public B

{

public:

D(int nn, float dd);

void h();

private:

double d;

};

How many private members does an object of class D have?

A)4

B)1

C)2

D)0

5)Which statement is incorrect?

A)If class D is derived from class B, then we say that class D inherits from class B.

B)If class D is derived from class B, we speak of D as the child class and B as the parent class.

C)If class D is derived from class B, we speak of D as the derived class and B as the base class.

D)If class D is derived from class B then class D has only some of the members from B, and the additional members defined in D.

6)A derived class object inherits all the members of the base class. Which of these remarks about the inherited member variables is incorrect?

A)Inherited members are need to be allocated memory and should be initialized at creation of a derived class object.

B)Inherited members’ memory allocation must be done by the base class constructor for the base class, which must be called.

C)Inherited members are not accessible to the derived class functions so can safely be ignored

D)The base class constructor is the most convenient place to initialize these inherited variables.

7)Which method is NOT used to find th root of an equation?

A)Bisection

B)Regula falsi

C)Trapezoidal rule

D)Secant

8)How many integration methods were explained in class?

A)4

B)2

C)1

D)3

9)Which numerical method was implemented in class?

A)Trapezoidal rule

B)Secant

C)Regula falsi

D)Simpson rule

10)What is required in order to find the root of a function by numerical methods?

A)The function value at the start of the interval and the function value at the end of the interval must be of opposite signs

B)The function value at the start of the interval and the function value at the end of the interval must be of the same sign

C)The number of iterations must be very large

D)The epsilon value must be very small

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order