QUIZ 3: Processing a C++ Program & Variables, Data Types, and Constants

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/37

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:52 PM on 6/22/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

38 Terms

1
New cards

A program written in a high-level language, created in the text editor, is called:

Source Code or Program

2
New cards

A source program must be saved in a text file with which extension?

.cpp

3
New cards

Preprocessor directives are statements that:

Begin with the symbol # and are processed by the preprocessor program

4
New cards

Which header file contains the descriptions of functions needed to perform input/output (I/O)?

iostream

5
New cards

Which header file contains the descriptions of mathematical functions such as power, absolute, and sine?

cmath

6
New cards

Which header file contains specifications of functions and manipulators that help format output in a specific manner?

iomanip

7
New cards

The compiler checks the source program for:

Syntax errors

8
New cards

The machine language version of the high-level programming language is called:

Object Program

9
New cards

Which program combines the object program with other programs in the library to create the executable code?

Linker

10
New cards

Which program loads the executable program into main memory for execution?

Loader

11
New cards

An interpreter differs from a compiler in that an interpreter:

Translates and executes one command at a time, resulting in slower execution

12
New cards

A compiler translates the source program and results in a program that:

Runs faster than a program translated by an interpreter

13
New cards

The process by which a computer executes the instructions of a computer program is called:

Execution

14
New cards

A value that can be manipulated by a program and is classified based on different data types is called a:

Value

15
New cards

A one-word name that points to a value is called a:

Variable

16
New cards

The general syntax for declaring a variable is:

dataType <variable_name>;

17
New cards

Data types that are built-in or predefined and can be used directly by the developer are called:

Primitive Data Types

18
New cards

Which data type is used to store integers or numbers without a decimal part?

int

19
New cards

Which keyword is used for a single precision data type that deals with decimal numbers with a maximum of 7 decimal places?

float

20
New cards

Which keyword is used for a double precision data type that deals with decimal numbers with a maximum of 15 decimal places?

double

21
New cards

Which data type is used to store Boolean or logical values?

bool

22
New cards

A bool variable can store which of the following values?

True or False

23
New cards

Which data type is used to represent characters (letters, digits, special symbols)?

char

24
New cards
25
New cards

How many bytes does a char data type typically store?

1

26
New cards

How many bytes does an int data type typically store?

4

27
New cards

What is the range of a signed char?

-128 to 127

28
New cards

The wchar_t data type is a:

Wide character data type with size greater than the normal 8-bit datatype

29
New cards

What is the correct syntax for declaring a wchar_t variable?

wchar_t w = L'A';

30
New cards

A string is defined as:

A sequence of zero or more characters enclosed in double quotation marks

31
New cards

In determining the length of a string, you should:

Include any spaces in the count

32
New cards

A memory location whose content is not allowed to change during program execution is called a:

Constant

33
New cards

The general syntax for declaring a constant is:

const dataType variable_name = value;

34
New cards

Which of the following is NOT a primitive data type in C++?

class

35
New cards

A token is defined as:

The smallest individual unit of a program written in any language

36
New cards

Identifiers in C++:

Consist of letters, digits, and underscore, and must begin with a letter or underscore

37
New cards

Declaration statements are used to:

Declare things such as variables

38
New cards

Executable statements are used to:

Perform calculations, manipulate data, create output, accept input, and so on