Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

1. When you define a class and add data members to it: 
You must reserve memory for the data members when you create objects.
The class automatically reserves memory for the data members.
The class automatically creates the objects for you.
The class automatically reserves the memory for private members.

2. When you declare an object: 
A class is automatically created.
The memory for its data members is reserved.
The memory for all other objects is reserved.
It will not have a constructor.

3. int myVar[3]; 
myVar contains 4 values.
myVar does not have any memory reserved for it.
The first value of myVar is stored in myVar[0]
myVar is not a valid variable name in C++

4. Find the error in this statement:

double d(4) = {1,2,3,4}; 
d is not a valid variable name
d does not contain 4 members
The initialization should use [1,2,3,4] instead of {1,2,3,4}
The declaration should use d[4] instead of d(4)

5. If variable myArray has 2 rows and 3 columns and stores integer values, it may be declared as follows: 
double myArray[3][2];
int myArray[2][3];
int myArray[3][2];
int myArray[2,3];

6. How many elements does this array have?

int myArray[4][5]; 
9
45
20
10

7. What notation would you use if you wanted to print the memory location of this variable?

int c = 3; 
c
*c
3
&c

8. If you wanted to print the memory address of this variable, what notation would you use?

int* c; 
c
*c
&c
int

9. If you want to print the value stored in c, what notation would you use to access the variable?

int c = 3; 
&c
*c
c
c[1]

10. int c = 3;
int* d;
d = &c;

Which of the following statements prints the memory address of c? 
cout << c;
cout << (*d);
cout << *c;
cout << d;
11. Declare a 2-dimensional variable named myArray that stores double values, has 4 rows, and has 3 columns.

12. What will be printed if the following code runs:

int a[2][3] = { {6,1,5}, {2,4,3} };

for (int i=0; i<2; i++)
for (int j=0; j<3; j++)
cout << a[i][j] << " ";

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9646457

Have any Question?


Related Questions in Computer Engineering

Suppose that a data warehouse consists of the four

Suppose that a data warehouse consists of the four dimensions date, spectator, location, and game, and the two measures count and charge, where charge is the fare that a spectator pays when watching a game on a given dat ...

Run a c code to solve the following problemsuppose that you

Run a C code to solve the following problem: Suppose that you are planning to pay $14500 yearly for 4 years for a car which is $50000 now what would be the interest rate? You may follow the bellow formula: P=A((1+i)^n-1) ...

Do a system model in terms of states inputs outputs next

Do a system model in terms of: States, Inputs, Outputs, Next state (state transition) function, and Readout (output) function. Define the states, inputs and outputs in terms of a description and as formal mathematical se ...

Describe an ethical conundrum found in a magazine or

Describe an ethical conundrum found in a magazine or newspaper article, and please give your own thoughts. Give good citations, of course.

Question subroutines and pointers in assembly languagewhat

Question : Subroutines and Pointers in Assembly Language. What is a subroutine and how to improve the assembly code? What are the different components of a subroutine, how they work?

Describe an ethical conundrum found in a magazine or

Describe an ethical conundrum found in a magazine or newspaper article, and please give your own thoughts. Give good citations, of course.

Question process designoperations management involves

Question: Process Design Operations management involves various activities, such as process design, selection, management of information technology, work systems, planning and development, and quality assurance (Slack, C ...

Question assignment instructions - 1000 words and at least

Question: Assignment Instructions: - 1000+ words and at least three references other than text - no polemics or personal attacks and avoid the rote repetition of platitudes or dogma - State your hypothesis and then attem ...

Question imagine that you are hired as a cio of a quickly

Question: Imagine that you are hired as a CIO of a quickly growing retail chain with an online presence. You have growing transactional databases but want to build a business intelligence infrastructure. You also have va ...

Solve in visual basic 2015 - into to programming using

Solve in Visual Basic 2015 - Into to Programming Using Visual Basic Chapter 3.3 Exercise 88 - this is all the information in the question Marketing Terms // The markup of an item is the difference between its selling pri ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As