compsci thus

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

This operator uses the value in context and then decrements the value of its operand.

Postfix Decrement

A pointer can be used as a function argument, giving the function access to the original argument. T or F

True

pointer variable may be initialized with

a valid address in the computer's memory

When you work with a dereferenced pointer, you are actually working with

the actual value of the variable whose address is stored in the pointer variable

Dynamic memory allocation occurs

when a new variable is created at runtime

What will the following code output? int number = 22; int *var = &number; cout << *var << endl;

22

In the following function prototype, how many parameter variables does this function have? int myFunction(double, double, double);

3

Select all that apply. The motivation for modular programming include:

Improves maintainability of programs

Given the following header for a function named computeArea, which of the following is a valid call to the function? int computeAre(int value1, int value2)

computeArea(40, 88);

You may nest while and do-while loops but you may not nest for loops.

false

To pass an array as an argument to a function, pass the __________ of the array.

name

The __________ is automatically appended to a character array when it is initialized with a string constant.

null terminator

If a function is called more than once in a program, the values stored in the function's local variables do NOT ________ between function calls.

persist

Given the following declaration, where is the value 77 stored in the scores array? int scores[ ] = {83, 62, 77, 97, 86}

score [2]

To help prevent memory leaks from occurring in C++11, a __________ automatically deletes a chunk of dynamically allocated memory when the memory is no longer being used.

smart pointer

Select all that apply. Which of the following must be included in a function prototype?

the name of the function the data type of the return value

An output file is a file that data is written to.

true

Which statement correctly uses C++11 to initialize a vector of ints named n with the values 10 and 20?

vector<int> n {10, 20};

Which of the function return type does not require a return statement in the function body?

void


संबंधित स्टडी सेट्स

New World History and Geography: Test 3

View Set

Chapter exam - Hawaii rules and laws

View Set

Chapter 4: Labor and Financial Markets

View Set

Nutrition, Elimination, and Enteral Feeds

View Set

Ch. 6 Review Questions from Book.

View Set

Vida y Muerte en la Mara Salvatrucha

View Set

Introduction To Moodle Theory Test

View Set