Reference no: EM131103067
Question 1: Which of the following C++ statements uses object-oriented programming?
a) for(int i = 0; i < 10; i++);
b) x = 5;
c) int *numbers = new int[10];
d) Mario.draw();
e) None of the above
Question 2: Consider the following class interface. Which of the functions is the default constructor?
1 2 3 4 5 6 7 |
classLibrary
{public:
Library();
Library(intnumBooks);
Library(constLibrary&other);};
|
a) Library();
b) Library(int numBooks);
c) Library(const Library &other);
d) All of the above
e) None of the above
Question 3: In the class interface from the previous question, which of the functions is the copy constructor?
a) Library();
b) Library(int numBooks);
c) Library(const Library &other);
d) All of the above
e) None of the above
Question 4: Which of the following C++ statements declares a Student object and initializes it with the value "Luke"?
a) Student Luke;
b) Student = "Luke";
c) Student s("Luke");
d) All of the above
e) None of the above
Question 5: Consider the following snippet of C++ code. Which of the following C++ statements uses dynamically allocated memory?
1 2 3 |
intx=5;
int*y=newint;
*y=5;
|
a) int *z = &x;
b) int &r = x;
c) int p = *y;
d) All of the above
e) None of the above
Question 6: Consider the following snippet of C++ code. Which statement causes a memory leak?
1 2 3 4 5 6 |
chara='!';
char*b=newchar;
char&c =*b;
char*d=&a;
char*e=newchar[12];
deleteb;
|
a) char a = '!';
b) char *b = new char;
c) char &c = *b;
d) char *d = &a;
e) char *e = new char[12];
f) delete b;
Question 7: In the previous question's snippet, which of the following C++ statements would fix the memory leak if added at the end?
a) a = NULL;
b) delete a;
c) delete d;
d) d = NULL;
e) delete[] e;
Question 8: Which of the following C++ statements correctly prints out the value of the first element in the array below? C++
1 2 |
int*array=newint[5];
array[0]=5;
|
a) cout << array[0] << endl;
b) cout << *array << endl;
c) cout << *(array + 0) << endl;
d) All of the above
e) None of the above
Analyze the behavior of spam-oriented botnets
: BotLab is a platform at the University of Washington that continually monitors and analyzes the behavior of spam-oriented botnets. There are many other locations on the Internet that keep real-time activities of botnets across the globe.
|
Should the firm lease or borrow and buy the equipment
: Assuming that the lease can be arranged, should the firm lease or borrow and buy the equipment? Explain. Consider the $200,000 estimated residual value. Is it appropriate to discount it at the same rate as the other cash flows? What about the other c..
|
Factors both internal and external to the organization
: Defined by the business dictionary, recruitment is, "The process of finding and hiring the best-qualified candidate (from within or outside of an organization) for a job opening, in a timely and cost-effective manner (Unknown, 2014)."
|
Discuss modes of winding up of a company
: Assuming that you have gone to an interview in Rhampsody Co.Ltd for position of an legal representative and the first question are asked is to discuss modes of winding up of a company. What could be your answers?
|
Statements uses object-oriented programming
: In the class interface from the previous question, which of the functions is the copy constructor - Which of the following C++ statements uses object-oriented programming?
|
Explain the level of sophistication that the board
: According to the FASB conceptual framework, the objectives of financial reporting for business enterprises are based on the needs of the users of financial statements.
|
Explain what the control helps mitigate in a scada system
: Select one control, identify whether the control falls under Management, Operational or Technical Controls and explain what this control helps mitigate in a SCADA system?
|
Apply for hospital presumptive eligibility
: See attached sample template for a response to the below post. The sample is a totally different subject, it's just provided as a sample for the type of feedback needed fot the below homework assighnment.
|
What is meant by the term
: What is meant by the term "qualitative characteristics of accounting information"?
|