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; 

Computer Engineering, Engineering

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

Have any Question?


Related Questions in Computer Engineering

What are the possible products when solutions of kbr and

What are the possible products when solutions of KBr and Sr(NO3)2 are mixed? And what is the identity of the precipitate.

Suppose in your company you formulate a python script that

Suppose in your company you formulate a Python script that inserts, updates, and deletes data in tables in a MySQL database. You post your Python script on a shared drive for other staff members to use. What are some the ...

What are content management systems cms describe the

What are Content Management Systems (CMS). Describe the challenges in implementing and maintaining CMS. Can internet search engines be considered as Content Management Systems - explain your answer.

How does westpac manage foreign exchange risk how does it

How does Westpac manage foreign exchange risk? How does it differ to the other 4 big banks? (ANZ, CBA and NAB)

Give a recursive algorithm that generates a similar series

Give a recursive algorithm that generates a similar series of coins for changing n cents. Don't use dynamic programming for this problem.

Given the following scenarios what is the standard

Given the following scenarios, what is the standard deviation for Acme, Inc.? Economy / Pri / Ri Strong / 0.3 / 40% Normal / 0.4 / 16% Weak / 0.3 / -20% Express your answer in decimal format (e.g., 0.1935 to represent 19 ...

Clientserver model please respond to the followingimagine

"Client/Server Model" Please respond to the following: Imagine that you are a lead developer for social media company and that one of your responsibilities is to help mentor junior developers. The junior developer that y ...

A substring is a contiguous sequence of characters from a

A substring is a contiguous sequence of characters from a string. For example, "cde" is a substring of the string "abcdefg". We say that substring s1 is duplicated in string s if s1 shows us in s at least two times, with ...

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Seamus was assigned to created web site plan for a charity

Seamus was assigned to created Web site plan for a charity organization. He must ensure that the site includes the following features: -A message stating the purpose of the charity -An online form that will receive perso ...

  • 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