Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Which of the following statements declares alpha to be an array of 25 components of the type int?

15/12/2020 Client: saad24vbs Deadline: 2 Day

Page 1 Multiple Choice Questions


Question 1.1. (TCO 1) What is the value of alpha[3] after the following code executes? int alpha[6] = {0}; int j; for(j = 4; j >= 0; j--) { alpha[j] = j + 5; if (j % 2 == 0) alpha[j + 1] = alpha[j] + 3; } (Points : 4)


       5 8 9 10


Question 2.2. (TCO 1) After the following statements execute, what are the contents of the matrix? int matrix[3][2] = {0}; int j, k; for (j = 0; j < 3; j++) for (k = 0; k < 2; k++) matrix[j][k] = j + k; (Points : 4)


       0 0 1 1 2 2 0 1 2 3 4 5 0 1 1 2 2 3 1 1 2 2 3 3


Question 3.3. (TCO 1) After the following statements execute, what are the contents of the matrix? int matrix[4][3] = {0}; int j, k; for (j = 0; j < 4; j++) for (k = 0; k < 3; k++) matrix[j][k] = 2 * j + k; (Points : 4)


       0 2 4 1 3 5 2 4 6 3 5 7 0 1 2 1 2 3 2 3 4 3 4 5 0 2 4 2 4 6 4 6 8 6 8 10 0 1 2 2 3 4 4 5 6 6 7 8


Question 4.4. (TCO 1) Which of the following correctly declares and initializes alpha to be an array of 4 rows and 3 columns with the component type int? (Points : 4)


       int alpha[4][3] = {{0,1,2} {1,2,3} {2,3,4} {3,4,5}}; int alpha[4][3] = {0,1,2; 1,2,3; 2,3,4; 3,4,5}; int alpha[4][3] = {0,1,2: 1,2,3: 2,3,4: 3,4,5}; int alpha[4][3] = {{0,1,2}, {1,2,3}, {2,3,4}, {3,4,5}};


Question 5.5. (TCO 1) What is stored in alpha after the following code executes? int alpha[5] = {0}; int j; for (j = 0; j < 5; j++) { alpha[j] = j + 5; if ( j % 2 == 1) //see if j is an even number alpha[j - 1] = alpha[j] + 2; } (Points : 4)


       alpha = {5, 6, 7, 8, 9} alpha = {5, 6, 10, 8, 9} alpha = {8, 6, 7, 8, 9} alpha = {8, 6, 10, 8, 9}


Question 6.6. (TCO 1) Which of the following statements declares alpha to be an array of 25 components of the type int? (Points : 4)


       int alpha[25]; int array alpha[25]; int alpha[2][5]; int array alpha[25][25];


Question 7.7. (TCO 2) A public member function of a class can access _____. (Points : 4)


       only other public members of the class. public and nonpublic members of a class only private members of a class neither public nor private class members


Question 8.8. (TCO 2) If a member of a class is ____, you cannot access it outside the class. (Points : 4)


       public automatic private static


Question 9.9. (TCO 2) Consider the following class definition. class rectangleType { public: void setLengthWidth(double x, double y); //Postcondition: length = x; width = y; void print() const; //Output length and width; double area(); //Calculate and return the area of the rectangle; double perimeter(); //Calculate and return the parameter; rectangleType(); //Postcondition: length = 0; width = 0; rectangleType(double x, double y); //Postcondition: length = x; width = y; private: double length; double width; }; And consider this declaration. rectangleType bigRect; Which of the following statements is correct? (Points : 4)


       rectangleType.print(); rectangleType::print(); bigRect.print(); bigRect::print();


Question 10.10. (TCO 2) In C++, the ____ is an operator called the member access operator. (Points : 4)


       . , :: #


Page 2 Multiple Choice


Question 1.1. (TCO 2) Suppose you have the following UML class diagram of a class. Which of the following is an accessor? (Points : 4)


       incrementHours setTime getTime clockType


Question 2.2. (TCO 2) Suppose you have the following UML class diagram of a class. According to the UML class diagram, which function is public and doesn't return anything? (Points : 4)


       incrementHours equalTime printTime setTime


Question 3.3. (TCO 2) Consider the following declaration. class myClass { public: void print(); private: int x; }; myClass myObject; Which statement is legal? (Points : 4)


       myObject.print = 10; myClass.print = 10; myObject.print(); myClass.print();


Question 4.4. (TCO 3) Composition is a stronger form of _____. (Points : 4)


       inheritance aggregation instantiation encapsulation


Question 5.5. (TCO 3) Composition and inheritance are two fundamental ways of relating _____. (Points : 4)


       classes objects class function members class data members


Question 6.6. (TCO 3) Aggregation is also sometimes called _____. (Points : 4)


       inheritance instantiation composition encapsulation


Question 7.7. (TCO 3) Which of the following statements is an accurate example of composition? (Points : 4)


       A car has an engine. A car is an automobile. A car is an object. A car has a class.


Question 8.8. (TCO 4) If the derived class does not override a public member function of the base class, you may specify a call to that public member function that has parameters by _____. (Points : 4)


       using the name of the function and no parameter list using only the name of the function using the name of the function and the appropriate parameter list Public member functions cannot be accessed in a derived class.


Question 9.9. (TCO 4) Which of the following is a valid definition of the derived class bClass? (Points : 4)


       class aClass: public bClass{ //...}; class bClass: public aClass{ //...}; class aClass::bClass{ //...}; class bClass::aClass{ //...}


Question 10.10. (TCO 4) Which of the following statements correctly describes an example of multiple inheritance? (Points : 4)


       Mother and Father to Children Animal to Reptile to Snake Parent to Child Animal to Mammal and Bird


Page 3 Multiple Choice


Question 1.1. (TCO 4) Which of the following relationships is not a correct example of inheritance? (Points : 4)


       Parent to Children Aunt to Uncle Grandparent to Grandchild Father and Mother to Children


Question 2.2. (TCO 4) To overload a member function of the base class, _____. (Points : 4)


       the name of the function and the formal parameter list of the corresponding function in the derived class must be same the name of the function must be different, and the formal parameter list of the corresponding function in the derived class must be same the name of the function and the formal parameter list of the corresponding function in the derived class must be different the name of the function must be the same, and the formal parameter list of the corresponding function in the derived class must be different


Question 3.3. (TCO 4) Which of the following is not true about public inheritance? (Points : 4)


       All the public member functions of the base class become the public member functions of the derived class. All the public member variables of the base class become the public member variables of the derived class. All the public members of the base class become the public members of the derived class. The the public member variables of the base class become the private member variables of the derived class.


Question 4.4. (TCO 5) What is the data type of pDist? Distance * pDist; (Points : 4)


       Distance Const pointer to Distance Pointer to Distance Pointer to MAX


Question 5.5. (TCO 5) Given the definition of a class called Employee and given an Employee pointer variable called myData, which is pointing to an array of 20 Employee objects, which of the following statements correctly accesses the getSalary method of the last employee that takes no parameters and returns a double value? (Points : 4)


       cout << *(myData + 20).getSalary( ); cout << myData[20].getSalary( ); cout << myData->getSalary[19]; cout << myData[19].getSalary( );


Question 6.6. (TCO 5) What is wrong with the following C++ statements? int* iptr; double d = 123.321; iptr = & d; cout << *iptr; (Points : 4)


       The cout statement does not contain an endl. The space following the ampersand should not be there. The iptr variable cannot be given an address of a double. All of the above


Question 7.7. (TCO 5) Assume that Distance is a class. Which is a valid statement to assign a new value to pDist? Distance * pDist; Distance d2(1, 2.3); (Points : 4)


       pDist = d2; pDist = *d2; pDist = &d2; pDist = #d2;


Question 8.8. (TCO 6) Which of the following operators may not be overloaded? (Points : 4)


       = :: || &&


Question 9.9. (TCO 6) What is a friend function? (Points : 4)


       An overloaded operator A function in a derived class that overrides a base class function of the same name A nonmember function of a class that has access to all the members of the class A function called by member function of a class


Question 10.10. (TCO 6) If a class uses dynamic memory allocation, which statement is true? (Points : 4)


       It must not use dynamic memory allocation in a copy constructor. All the allocated memory must be deallocated before the object goes out of scope and the destructor is called. It must not overload the assignment operator. It must include the dynamic allocation in all the constructors, and it must then deallocate all of the allocated memory in the destructor.


Question 11.11. (TCO 6) Which of the following operators can be overloaded? (Points : 4)


       . .* :: ++


Question 12.12. (TCO 7) Overriding a base-class member function with a derived member function demonstrates the concept of _____. (Points : 4)


       overloading inheritance polymorphism abstraction


Question 13.13. (TCO 7) If a function is declared virtual in a base class, then _____. (Points : 4)


       it must also be declared virtual in any derived classes it must not be overridden in any derived classes it remains virtual even if a derived class overrides it and does not declare it as virtual it must be overridden in all derived classes


Question 14.14. (TCO 7) Consider the following class definitions. class Employee { }; class Boss : public Employee { }; class Worker : public Employee { }; If the function double CalculateEarnings(); is declared as virtual in the class Employee, which class then becomes abstract? (Points : 4)


       Boss Employee Worker Both Boss and Worker


Question 15.15. (TCO 7) Which term is a correct definition of run-time binding? (Points : 4)


       Late binding Independent binding Dependent binding Static binding


Question 16.16. (TCO 7) Polymorphism means _____. (Points : 4)


       having the ability to use the same expression to denote different operations having multiple objects of the same class that a derived class has more than one base class creating new objects and classes from existing objects and classes


Question 17.17. (TCO 8) In a multifile, object-oriented, C++ project, which file contains the class implementation? (Points : 4)


       classname.hdr classname.h classname.def classname.cpp


Question 18.18. (TCO 8) When creating a macro, which preprocessor directive is used? (Points : 4)


       ifndef define ifdef endif


Question 19.19. (TCO 8) Class header files are usually designated by what indicators? (Points : 4)


       < > ( ) " " ' '


Question 20.20. (TCO 8) In a multifile, object-oriented, C++ project, which is the correct statement for the constructor implementation, given that the constructor is correctly defined in the class definition file? (Points : 4)


       Classname:Classname{ } Classname { } Classname::Classname { } Classname { }



Applied Sciences

Architecture and Design

Biology

Business & Finance

Chemistry

Computer Science

Geography

Geology

Education

Engineering

English

Environmental science

Spanish

Government

History

Human Resource Management

Information Systems

Law

Literature

Mathematics

Nursing

Physics

Political Science

Psychology

Reading

Science

Social Science

Home

Blog

Archive

Contact

google+twitterfacebook

Copyright © 2019 HomeworkMarket.com

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Homework Guru
Top Essay Tutor
Best Coursework Help
University Coursework Help
Helping Hand
Essay & Assignment Help
Writer Writer Name Offer Chat
Homework Guru

ONLINE

Homework Guru

Hi dear, I am ready to do your homework in a reasonable price and in a timely manner.

$47 Chat With Writer
Top Essay Tutor

ONLINE

Top Essay Tutor

I have more than 12 years of experience in managing online classes, exams, and quizzes on different websites like; Connect, McGraw-Hill, and Blackboard. I always provide a guarantee to my clients for their grades.

$50 Chat With Writer
Best Coursework Help

ONLINE

Best Coursework Help

I am an Academic writer with 10 years of experience. As an Academic writer, my aim is to generate unique content without Plagiarism as per the client’s requirements.

$45 Chat With Writer
University Coursework Help

ONLINE

University Coursework Help

Hi dear, I am ready to do your homework in a reasonable price.

$47 Chat With Writer
Helping Hand

ONLINE

Helping Hand

Hello, I an ranked top 10 freelancers in academic and contents writing. I can write and updated your personal statement with great quality and free of plagiarism as I am a master writer with 5 years experience in similar ps and research writing projects. Kindly send me more information about your project. You can award me any time as I am ready to start your project curiously. Waiting for your positive response. Thank you!

$40 Chat With Writer
Essay & Assignment Help

ONLINE

Essay & Assignment Help

I have a Master’s degree and experience of more than 5 years in this industry, I have worked on several similar projects of Research writing, Academic writing & Business writing and can deliver A+ quality writing even to Short Deadlines. I have successfully completed more than 2100+ projects on different websites for respective clients. I can generally write 10-15 pages daily. I am interested to hear more about the project and about the subject matter of the writing. I will deliver Premium quality work without Plagiarism at less price and time. Get quality work by awarding this project to me, I look forward to getting started for you as soon as possible. Thanks!

$40 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Research Paper - Internal resistance of a cell conclusion - Celta assignment focus on the learner example - Mail hull ac uk - How to calculate correlation coefficient on calculator casio - Basic coordinates and seasons student guide answer key - Index of password txt - Metamotivation according to maslow - Loss of innocence archetype - Solving quadratic equations by extracting square roots definition - Pillars of society matrix - Pre lab questions answers biology - Patrick the human resources manager at acme company - Db 6 - Discussion: The Future of Aviation Simulation - 2 replies - Writting assignments - Appositive worksheet combining sentences - Www rbh access com - Need tomorrow - Michael jordan's basketball hall of fame enshrinement speech - Geo 3030 - Project scope for office relocation - Difference quotient calculator with work - Two discussions due today before 11:59 pm - Ib math investigation example - Sephora case study analysis - The winkfield [1902] p 42 - Team management powerpoint presentation - Barwon south west region - Assessment for learning ppt 2010 - You conduct a dihybrid cross. a ________ ratio would make you suspect that the genes are linked. - List ways in which secret keys can be distributed to two communicating parties. - Compared to the purely competitive industry a pure monopoly - Analysis of cherry pink and apple blossom white - Leather hard ceramics definition - Ariens zoom 34 parts diagram - Journal critique: Physical Fitness and Intercollegiate Athle - Prisons - Capstone Research Companion - Riddells creek scout camp - Rick van vliet idaho - Advantages and disadvantages of financial budget - Go all in one computer concepts and applications answers - Walt disney case study pdf - Probability And Statistical Inference - Pos ch 1 - Wheel of fortune sextet nyt crossword - Why did the teacher open a window company - Apc back ups 550 - Homework - Strategic management multiple choice questions and answers - Strengths and limitations of visually interpreting histograms - Elevator Design you are designing an elevator for a hospital. The force exerted on a passenger by the floor of the elevator is not to exceed 1.60 times the passenger's weight. The elevator accelerates upward with constant acceleration for a distance of 3.0 m and then starts to slow down. What is the maximum speed of the elevator? - S. dakota pastor bill guthrie - Research paper 3-4 pages not including cover and title page due in 3 days. Possible? - Intellectual fair mindedness - Lion rock pty ltd strathfield - Gerd soap note - Appeal to fear examples - Which of the following statements regarding fixed costs is incorrect - Two pellets each with a charge of - Media and society nicholas carah - Qaunatative math homework - Doug lemov teach like a champion pdf - List of airbus a380 orders and deliveries - Security architecture - Why might fire extinguishers exhibit positive externalities - Information governance training slides - Christology from above - Medical cover letter template - Discussion 1 - one page essay paper - 33/16 as a mixed number - Beale v taylor 1967 - Prince junior tennis sponsorship - Sample soap note for diabetes - Social media and isolation essay - In situ pile foundation - Ques - The general term of health or medical informatics refers to - Class 6 license manitoba - Animal testing speech persuasive - Pspi payroll service providers inc - Properties of language productivity - 2 DISCUSSIONS DUE IN 36 HOURS - I need help in writing a Case Study on Planning Organizational Change Using the Four-Step Change Process. - How to determine void volume in gel filtration - Ap lang rhetorical analysis - Return and Risk - 16 thurbro drive keysborough - Concrete roof tiles nz - HRM 652 EVALUATING RESULTS AND BENEFITS - Old unhappy far off things poem - Wileyplus accounting homework answers chapter 3 - Enron the smartest guys in the room ethical issues - Respraying plantation shutters melbourne - Risk management plan document template - Comment 1 - Farewell to manzanar pdf