Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

13. How much memory is reserved for the following variables in MS Visual C++? double x; int k, *k_ptr; double *x_ptr; A. 10 B. 16

13. How much memory is reserved for the following variables

in MS Visual C++?

double x;

int k, *k_ptr;

double *x_ptr;

A. 10

B. 16

C. 20

D. 24

14. What is the purpose of the sizeof operator in C++?

A. There is no sizeof operator in C++.

B. To return the total number of bytes of the program.

C. To report if the system has enough memory for the data variables.

D. To report the number of bytes of storage reserved for a given variable or datatype.

15. What is the purpose of the rangeof operator in C++?

A. There is no rangeof operator in C++.

B. To report the range of values for a given datatype.

C.To tell the program if a value is out of range.

D. There is no rangeof operator in C++, but there is a RangeOf function in .

17. What is the purpose of the reverse operator in C++?

A. There is no reverse operator in C++.

B. To return the hexadecimal address of a variable.

C. To report the system backup rate.

D. To allow the variables to be switched during program execution.

18. When the address of a data variable is passed to a function,

what type of call is used?

A. Call by reference

B. Call by value

C. Call by indirection

D. Both A and C

21. Which is the best example of a naming convention for a pointer?

A. pVar

B. pointer_to_var

C. *pVar

D. Conventions are a waste of time.

24. Given the code:

int number, *ptr_num = &number;

what is wrong with the assignment: ptr_num = 3 ?

A. You cant assign an int to a pointer.

B. ptr_num is not defined.

C. The number variable must be assigned an address.

D. Nothing is wrong.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

Show your answer that explains how to get 1 1 , 5 0 0 pounds?

Answered: 1 week ago

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago