C++ Exam 1 Quizes

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

The preprocessor executes after the compiler.

False

These are data items whose values do not change while the program is running.

Literals

Which of the following is not one of the five major components of a computer system?

Preprocessor

The computer's main memory is commonly known as:

RAM

A character literal is enclosed in ________ quotation marks, whereas a string literal is enclosed in ________ quotation marks.

Single, double

In programming terms, a group of characters inside a set of quotation marks is called a:

String literal

In a C++ program, two slash marks ( // ) indicate:

The beginning of a comment

In C++, key words are written in all lowercase letters.

True

________ represent storage locations in the computer's memory.

Variables

In the process of translating a source file into an executable file, which of the following is the correct sequence?

source code, preprocessor, modified source code, compiler, object code, linker, executable code

When the final value of an expression is assigned to a variable, it will be converted to:

the data type of the variable

This manipulator is used to establish a field width for the value immediately following it.

setw

The total number of digits that appear before and after the decimal point is sometimes referred to as:

significant digits and precision

At the heart of a computer is its central processing unit. The CPU's job is:

to fetch instructions, to carry out the operations commanded by the instructions, to produce some outcome or resultant information

Which of the following is a preprocessor directive?

#include <iostream>

An example of a secondary storage device is:

A hard disk

________ are used to translate each source code instruction into the appropriate machine language instruction.

Compilers

You must have a ________ for every variable you intend to use in a program.

Definition

The function, pow(x, 5.0), requires this header file.

cmath

To use the rand( ) function, you must #include this header file in your program.

cstdlib

The programming process consists of several steps, which include:

design, creation, testing, and debugging

In any program that uses the cin object, you must include the ________.

iostream header file

This manipulator causes the field to be left-justified with padding spaces printed to the right.

left

When a variable is assigned a number that is too large for its data type, it:

overflows

A statement that starts with a # is called a:

preprocessor directive


Conjuntos de estudio relacionados

NURS 321 Chapter 1 (Weber and Kelley) Prep-u Questions

View Set

PARAGRAPHS: Identifying Main Point and Support in Paragraphs Quiz

View Set

Foundations of Professional Practice Exam #1

View Set

cardiovascular disease risk factors and defining criteria

View Set

Billy - History - 3rd Quarter Exam Study Guide

View Set

Environment effect during exercise

View Set

Fundamentals of Health Care Management Domain Questions

View Set

Health Insurance Policy Provisions, Clauses, and Riders

View Set

Biology Final Part 1: Into The Cell

View Set