Chapter 3 Review C++

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

True

A keyword is a word that has a special meaning in programming language in which you are using

True

A variable is a memory location whose value can change during runtime

variable

A____ is a memory location whose value can change during runtime

keyword

A_____ is a word that has a special meaning in programming language you are using

literal constant

A_____ is not a memory location; rather, it is an item of data that can appear in a program instruction and can be stored in a memory location

named constant

A______ is a memory location whose value cannot change during runtime

double

All numeric literal constants with a decimal place are treated as the _____ data type

string

All of the following are fundamental data types except______

name in C++ are not case sensitive

All of the following are rules for naming a memory location in C++ except______

True

Another name for fundamental data types are primitive data types

Initializing

Assigning a beginning value to a memory location is referred to as _____

False

Camel case means capitalizing the entire name of a variable or named constant

binary

Data is stored in memory using the _____ number system

implicit type conversion

If the value's data type does not match the memory location's data type, the computer uses a process called ________ to convert the value to fit the memory location

False

If the value's data type does not match the memory location's data type, the computer uses a process called explicit type conversion to convert the value to fit memory location.

True

In C++, the float and double variable data types are used to store real numbers

1

In all the number systems, the result of raising the base number to the 0th power is ____

False

Numbers are represented in memory using the decimal number system

string yourname= 0.0 ; double yourname= 0.0; double yourincome= 0.0;

Short answer Write the C++ statements to declare and appropriately initialize variables representing the following: 1. Your name 2. Your age 3. Your income

none of the above

The ASCII value of the number zero would be _________ a. 0 , b. 0.0, c. either a or b, d. none of the above

False

The name of a memory location in C++ can be a keyword

False

The name of a memory location in C++ can contain a space

True

The name of location in C++ must begin with a letter

0.0

The proper initial value for a variable declared to be of the float data type would be ____

two

The short data type can only store a number in the range from -32,768 to +32,767. How many bytes of memory is required for the short data type?

False

The string data type is an example of a fundamental data type in C++

True

The term syntax refers to the rules of a programming language

False

The value of a named constant is allowed to change during runtime

False

User-defined data types are the basic data types built into the C++ language

0111

What is the binary equivalent of the decimal number 7?

promoted

When a numeric value is converted from one data type that can store larger numbers, the value is said to be ______

Camel case

When a variable's name contains two or more words, most C++ programmers enter the name using ______

const

When declaring a named constant, the ___ keyword indicates that the memory location is being declared cannot be changed during runtime

False

When naming a memory location in C++, names are not case sensitive

float

Which of the following data types can contain a real number?

-123

Which of the following is a valid integer value?

a1B2c3D4

Which of the following would be a valid name for a memory location in C++?

2ndname

Which of the following would be an invalid name for a memory location in C++?

Syntax

____ refers to the rules of a programming language

single

a character literal constant is a single character enclosed in ______ quotation marks

ASCII

is a coding scheme that assigns a specific numeric code to each character on your keyboard

one

memory locations assigned the char data type can store _____ character(s)

data is being demoted and it can affect the outcome

short answer What happens in C++ when a number is converted from one data type to another data type that can store only smaller numbers? Are there any potential consequences from this occurring? If so, please give an example

A variable can change while the programing but the named constant can't

short answer What is the primary difference between a variable and a named constant C++?

because it makes it easier for the user to identify which are constants

short answer why are the names given to named constants usually spelled in all capitals in C++?

6

what id the decimal equivalent of the binary number 110?

demoted

when a numeric value is converted from one data type to another data type that can store smaller numbers, the value is said to be _______

all of the above

which of the following is a string literal constant? a. "" ,b. "&", c. "Hello" d. all of the above

"string"

which of the following would be a valid string literal constant?


Ensembles d'études connexes

Intro to Supply Chain Rutgers Chapter 5

View Set

RELIABILITY; Q1 Discuss research on reconstructive memory.

View Set

Legal Environment of Business Final Review

View Set

Chapter 25: The Dental Hygiene Care Plan

View Set

Neuro Exam Vocabulary and Practice Questions

View Set