CSCI 1370

¡Supera tus tareas y exámenes ahora con Quizwiz!

False

A function's parameter list cannot be empty.

False

A function's return type must be the same as the function's parameters.

True

A global identifier is an identifier declared outside of every function definition.

linker

A program called a(n) ____ links together the object files and libraries.

False

A reserved word can be used as a variable name.

False

A value-returning function can return two values via the return statement.

False

A value-returning function should have reference parameters only.

128

ASCII is a standard that defines the numeric codes for ____ characters.

algorithm

An ____ is a sequence of steps for solving a problem.

double

An example of a floating point data type is ____.

True

Any parameter that receives a value and also sends a value outside the function must be declared as a reference parameter.

False

Assembly language, ALGOL, FORTRAN, C, C++, and Java are all high-level languages.

True

Compilers are programs that automatically translate high-level language programs into executable programs.

True

Entering a char value into an int variable causes serious errors, called input failure.

True

Every C++ program must have a function called main.

True

Files (i.e., file stream objects) should be passed by reference.

False

Files (i.e., file stream objects) should be passed by value.

True

For interactive input/output in a program, the program must include the header file iostream.

False

GIGA is a unit prefix in the metric system denoting a factor of one million (1,000,000).

int u = test(5.0, '*');

Given the following function prototype: int test(float, char); which of the following statements is valid?

1 2.5

Given the function definition: void increment_val(int val1, float val2 ){ val1 = val1 + 1; val2 = val2 + 1.0;} what are the values printed on the screen after the statements below are executed? int myval = 1;float yourval = 2.5;increment_val(myval, yourval);cout << myval << ' ' << yourval;

True

If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right.

False

If a void function has three value parameters, it must have at least two reference parameters.

False

If the parameter list of a function is empty, the parentheses after the function name are not needed.

False

In an output statement, each occurrence of endl advances the cursor to the end of the current line on an output device.

True

In the C++ statement, cin.get(u); u must be a variable of type char.

False

In the statement cin >> x;, x can be a variable or an expression.

True

Information stored in main memory must be transferred to a nonvolatile device for permanent storage.

True

Instructions represented as a sequence of 0s and 1s are known as machine instructions.

True

It is legal to use a return statement without any value in a user-defined void function.

True

It is not necessary to specify the names of parameters in a function prototype.

memory locations

Main memory is an ordered sequence of items, referred to as ____.

random access memory

Main memory is called ____.

iostream

Manipulators without parameters are part of the ____ header file.

False

Manipulators without parameters are part of the header file iomanip.

void printHeading()

Suppose that printHeading is a function without any parameters. Which of the following is a valid function heading?

ch = '2', x = 76

Suppose that x is an int variable, ch is a char variable, and the input is: 276. Choose the values after the following statement executes: cin >> ch >> x;

False

Suppose x = 8. After the execution of the statement y = x++; y is 9 and x is 8.

False

The Devices that feed data and programs into computers are called output devices.

True

The content of a parameter that is a reference parameter is an address.

False

The corresponding argument for a reference parameter can be any expression.

bit

The digit 0 or 1 is called a binary digit, or ____.

False

The escape sequence \t moves the cursor to the beginning of the next line.

True

The execution of a C++ program always begins with the function main.

True

The execution of a return statement in a user-defined function terminates the function.

True

The explicit conversion of a value from one data type to another is called type casting.

False

The extraction operator >> skips only leading blank spaces when searching for the next data in the input stream

False

The following is a legal C++ identifier: Hello!

True

The maximum number of significant digits in float values is up to 6 or 7.

four

The memory allocated for a float value is ____ bytes.

False

The value of a variable cannot change during program execution.

analyzing the problem

To develop a program to solve a problem, you start by ____.

True

Using functions greatly enhances the program's readability because it reduces the complexity of the function main.

False

Using global variables in a program is a better style than using local variables because extra variables can be avoided.

False

Value-returning functions cannot be called in expressions.

False

When a function is called, flow of control moves to the function's prototype.

value

When a function just needs to use a copy of an argument passed to it, the argument should normally be passed by

True

When reading data into a char variable, after skipping any leading whitespace characters, the extraction operator >> finds and stores only the next character; reading stops after a single character.

True

When the CPU is executing an instruction that needs some data, it gets the data from main memory in order to process it.

main memory

When the power is switched off, everything in ____ is lost.

False

When writing a function prototype, you do not have to specify the data type of each parameter.

True

Whenever the value of a reference parameter changes, the value of the argument changes

int funcTest(int, int, float);

Which of the following function prototypes is valid?

char

Which of the following is a reserved word in C++?

46259

____ is a valid int value.

Digital signals

____ represent information with a sequence of 0s and 1s

True

"{" and "}" are called braces and they delimit a list or block of statements.

10 15

int alpha = 5;int beta = 10; alpha = alpha + 5; { int alpha = 20; beta = beta + 5;} cout << alpha << " " << beta << endl;


Conjuntos de estudio relacionados

Sugar: The simplest of Carbohydrates

View Set

COMPORTAMIENTO DEL CONSUMIDOR P#1

View Set

ATI Dynamic Quiz Med Surg Respiratory

View Set

WHY DO U DO THIS TO US MS DEFALCO WHY

View Set