Chapter 1-4 review C++ Programming

Ace your homework & exams now with Quizwiz!

Logical Operators

&&, ||, and ! are _____ operators.

False

Assembly language is considered a high-level language.

Unicode

An extensive encoding scheme that can also represent the characters of most of the languages in the world is _____.

True

An interpreter is a program that both translates and executes the instructions in a high-level language program.

Concatenation

An operation that is performed on strings using the + operator is _____, or appending one string to the end of another string.

RAM

Another name for main memory within a computer.

True

Any piece of data that is stored in a computer's memory must be stored as a binary number.

Secondary Storage

The computer stores a program while the program is running, as well as storing the data that the program is working with, in _____.

Literals or constants

The following data 72 'A' "Hello World" 2.8712 are all examples of

CPU

The part of a computer that runs programs is called _____.

Hardware

The physical devices that a computer is made of are referred to as _____.

Truncation

The process of dropping a number's fractional part is called _____.

Syntax

The rules that must be followed when writing a program are called _____.

Relational Operators

The symbols >, <, and == are all _____ operators.

False

The test expression in a switch statement must have an integer value.

Key Words

The words that make up a high-level programming language are called_____.

RAM

This is a volatile type of memory that is used only for temporary storage while a program is running: _____.

default

This section of a switch statement is branched to if none of the case values match the test expression:

switch

This statement allows you to test the value of an integer variable or expression and then use that value to determine which statement or set of statements to execute:

False

Today, CPUs are huge devices made of electrical and mechanical components such as vacuum tubes and switches.

Microprocessors

Today, Central Processing Unit's are small chips known as _____.

False

Variable names can have spaces in them.

False

In C++, uppercase and lowercase letters are considered the same.

Declare

In C++, you must_____ a variable before you can use it to store data.

True

In a math expression, multiplication and division takes place before addition and subtraction.

Binary

In a(n) _____ numbering system, all numeric values are written as sequences of 0s and 1s.

Decode

In the _____ part of the fetch-decode-execute cycle, the CPU determines which operation it should perform.

Operands

In the expression 12 + 7, the values on the right and left of the + symbol are called _____.

IDE

Integrated Development Environment

True

Machine language is the only language that a CPU understands.

#

Pre-processor directives begin with a

Scope

Programmers use the term _____ to describe the part of a program in which a variable may be accessed.

Comments

Short notes placed in different parts of a program explaining how those parts of the program work are called _____.

True

String literals are enclosed in double quotation marks.

char

The _____ data type is used to store individual characters in memory.

!

The _____ operator takes a Boolean expression as its operand and reverses its logical value.

Assembler

The _____ translates an assembly language program to a machine language program.

Variable name

A _____ identifies a variable in the program code.

flag

A _____ is a Boolean variable that signals when some condition exists in the program.

Named constant

A _____ is a name that represents a literal value and cannot be changed during the program's execution.

Variable

A _____ is a storage location in memory that is represented by a name.

Byte

A _____ is enough memory to store a letter of the alphabet or a small number.

Decision

A _____ structure can execute a set of statements only under certain circumstances.

Zero "0"

A bit that is turned off represents the following value: _____.

Bits

A byte is made up of eight _____.

Input Devices

A component that collects data from people or other devices and sends it to the computer is called _____.

||

A compound Boolean expression created with the _____ operator is true if either of its sub-expressions is true.

&&

A compound Boolean expression created with the _____ operator is true only if both of its sub-expressions are true.

True

A compound Boolean expression that has two sub-expressions connected with the && operator is true only when both sub-expressions are true.

False

A compound Boolean expression that has two sub-expressions connected with the || operator is true only when both sub-expressions are true.

True

A decision structure can be nested inside another decision structure.

Curly Braces {}

A group of statements, such as the contents of a function, is enclosed in

False

A program can be made of only one type of control structure. You cannot combine structures.

ASCII

A set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters is _____.

False

A syntax error does not prevent a program from being compiled and executed.

Secondary Storage

A type of memory that can hold data for long periods of time - even when there is no power to the computer is called _____.

Data Type

A variable's _____ indicates the type of data that the variable will hold.

Output Devices

A video display is a(n) _____ device.

Program

A(n) ___ is a set of instructions that a computer follows to perform a task.

Boolean Statement

A(n) _____ expression has a value of either true or false.

Compiler

A(n) _____ program translates a high-level language program into a separate machine language program.

True

C++ is a good language for game programming because it is fast and efficient.

combined assignment operators

C++ offers a special set of operators known as _____ that are designed specifically for changing the value of a variable without having to type the variable name twice.

True

Comments are ignored by the compiler.

Machine Language

Computers can only execute programs that are written in _____.

cout statement, function main, and #Include statement

Every C++ program must have a

Semicolon

Every complete statement ends with a

False

Images, like the ones you make with your digital camera, cannot be stored as binary numbers.

False

In C++ the first character of a variable name can be a number.

True

When you declare a named constant, an initialization value is required.

else-if

You use a(n) _____ statement to write a dual alternative decision structure.

if statement

You use a(n) _____ statement to write a single alternative decision structure.

==

You use the _____ operator to determine whether two strings are equal.

False

char literals are enclosed in double quotation marks.

Pseudo-code

is an informal high-level description of the operating principle of a computer program or other algorithm.


Related study sets

Personal Finance: Chapter 6- Consumer Purchasing Strategies

View Set

HESI: The Emergent Care Clinic and Rationale

View Set

Lesson 106 - Applied Math, Ohm's Law, Electrical Symbols, Boxes, and Box Fill Reading Worksheet

View Set

Health/disease Mind-Body Connection

View Set

BIOL 107 Study Set First 8-weeks

View Set