ScholarMatic | 24/7 Homework Help

ScholarMatic Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

MAC 102-Which statement is incorrect

by | Dec 1, 2023 | Posted Questions

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

ScholarMatic: Explanation & Answer

Your ready answer from a verified tutor is just a click away for as little as $14.99


  

Click Order Now to get 100% Original Answer Customized to your instructions!

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

ScholarMatic: Get Started

Assignment Writing Service

Feel safe and secure when placing an order on our portal!
Fruitful cooperation begins with solid guarantees, and we are professional enough to promise perfect results. Let’s get it started!