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.

100% Correct Answers

by | Nov 30, 2023 | questions

 (TCO 4) What is wrong with the following switchstatement?
switch(x)
{
case 0:
cout case 2:
cout break;
default:
cout break;
} (Points : 7) 
The value of x could be something other than 1 or 2.
There is no break statement for case 1.
There is no semicolon after the closing bracket.
All of the above
(TCO 4) A variable declared before and outside all function blocks(Points : 7) 
is visible only in main.
is visible to all functions.
is visible to all functions except main.
is not visible to any functions.
 (TCO 4) C++ selection statements include
(Points : 7) 
for, while, do-while.
cout and cin.
if, if-else, if-else if, switch.
#include and using namespace std;.
 (TCO 4) Which operation in the following expression will beperformed first?
c = a++ / b + 5; (Points : 7) 
a
a/b
assignment to c
b + 5
(TCO 4) How many elements does the following array contain?
double data [100] [500]; (Points : 7) 
500
100
600
50,000
 (TCO 4) The code below computes the length of a C-stylestring. What should the value of FLAG be?
char name[20]= “Lancilot”;
int length=0;
while(name[length] != FLAG)
{
length = length+1;
}
cout ‘’
20
NULL
0
(TCO 4) Given the following code to fill an array,
int;
int data[100];
for(int i = 0; i data = i;
what should the value of X be? (Points : 7) 
100
101
99
i
 (TCO 4) Given the following code fragment, what is the datatype of thisStudent?
struct student
{
string name;
double gpa;
};
student thisStudent; (Points : 7) 
string
const pointer to student
student
double
(TCO 4) Which of the following is an invalid declaration tooverload the following function?
double foo(int); (Points : 7) 
double foo(double);
int foo(int);
double foo(double *):
double foo(int *);
12. (TCO 4) Which of the following statements call the followingfunction correctly? 
int MultiplyValues (int, int); (Points : 7) 
int a = MultiplyValues (int x, int y);
int a = MultiplyValues (10, 20);
double d = MultiplyValues (int 10, int 20);
All of the above
 (TCO 4) What is the output of the following code?
void func(int x[ ])
{
x[0] = x[0] * 3;
x[1[ = x[1] * 3;
x[2] = x[2] * 3;
}
void main ()
{
int x[ ] = {1, 2, 3};
func(x);
cout } (Points : 7) 
1 2 3
3 4 5
3 6 9
3 3 3
(TCO 4) Which of the following function definitions usespass-by-values? (Points : 7) 
int myFunc( int * x, int * y );
int myFunc( int x, int y ) ;
int myFunc( int & x, int & y ) ;
int myFunc( int @ value1, int @ value2 ) ;
(TCO 4) Which of the following is called automatically each time anobject is created? (Points : 7) 
Compiler
Builder
Constructor
Destructor
(TCO 4) Creating one class from another in a parent/child hierarchyis an example of (Points : 7) 
encapsulation.
polymorphism.
inheritance.
abstraction.
(TCO 4) A Distance class has two private members, ‘feet’, of typeint, and ‘inches’, of type double. Which prototype correctlydeclares the copy constructor for such class? (Points :7) 
Distance Distance(const Distance &);
Distance(const Distance &);
int Distance(int, double);
Distance(feet, inches);
(TCO 4) Composition is typically an example of (Points :7) 
a “has a” relationship.
an “is a” relationship.
a “uses a” relationship.
a “is used” relationship.
(TCO 4) What is the name of a member function of a class that onlyaccesses the value(s) of member variable(s) and does not modify thevalue(s)? (Points : 7) 
Set
Private
Member
Accessor
(TCO 4) A derived class is typically an example of (Points :7) 
a “has a” relationship.
an “is a” relationship.
a “uses a” relationship.
a “is used” relationship.
(TCO 4) When writing a class, the compiler automatically createssome support functions for the class. What are some of thesefunctions? (Points : 7) 
Assignment operator function
Copy constructo

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!