stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
C++ Quiz Exam 1 Flashcards | StudBud
Explore
/
C++ Quiz Exam 1
C++ Quiz Exam 1
35 terms
·
StudBud Administration
·
17 plays
Imported from external platform
Flashcards
35 cards
F
Practice quiz
P
Host live
L
Questions
35
Answers
1
In some programming languages, strings are a composite data type.
True
False
2
Which statement describes a characteristic of semantics in the context of programming languages?
Programming semantics are like grammar rules in written language.
Semantics define meaning; syntax sets word order and punctuation.
Various programming languages use different punctuation semantics.
Semantics refers to the meaning and validity of program statements.
3
Which statement accurately describes a characteristic of composite data types?
Composite data types are important time savers
Composite data types are built into your programming language.
data that represents time would be handled as a composite data type.
prog does not have 2 specify the mechanics of storing or adding two numbers
4
Which phrase describes a literal in the context of a programming language?
any element of data specified for a program
characteristics of an object
a named memory location that holds data, but not changed by the statements
a named memory location that temporarily holds text or a numeric value
5
Which phrase describes character and string literals?
named memory locations that hold data that is not changed
words used by a programming language for a specific purpose
the words True and False not enclosed in single or double quotes
data such as letters, symbols, words, and sentences
6
A string is a sequence of alphanumeric characters typically enclosed in quotation marks.
True
False
7
The term ____ refers to program execution that continues to the next conditional statement within a structure.
fall through
waterfall
slip
flow
8
Which sentence best describes the purpose of a control structure?
It provides a named procedure that performs a specific task.
It contains logic that continues or ends the loop.
It is used to alter the sequential execution of statements in a PC prog
It evaluates to True or False.
9
What item is a key characteristic common to programming languages?
arithmetic operators that can be used to perform calculations
curly braces and quotation marks as punctuation
reserved words, which must include cout and printIn
keyword print that sends output to a display device
10
Programming algorithms specify the underlying logic for the statements in a computer program.
False
True
11
How much storage is required for one ASCII character?
1 bit of memory
8 bytes of memory
16 bytes of memory
1 byte of memory
12
A signed integer requires one binary digit as the sign.
False
True
13
A Boolean type is used in conditionals, while a Boolean expression is used in declarations or assignments.
True
False
14
There can be more than one programming algorithm for solving a problem or performing a task.
True
False
15
The = operator ____ , while the == operator ____.
Compares two operands for equality; can assign and compare in one step.
Likely causes an error in a condition; assigns a value to a variable.
Compares two operands for equality; assigns a value to a variable.
Assigns a value to a variable; checks if two operands are equal.
16
The term “data type” refers to ____.
a similarity found in a procedure or task
a value that usually includes one or more arithmetic operators
any element of data that you specify for a program
a way of categorizing data
17
Which statement describes the punctuation conventions used for character data?
Char literals are enclosed in double quotes when assigned to a variable.
Char literals must be enclosed in single quotes when assigned to a variable
Character literals are not surrounded by asterisks; they use single quotes.
Char literals are enclosed in single quotes when assigned to a variable.
18
Which term refers to code that can be distributed as computer software, desktop applications, web apps, and mobile apps?
computer program
keyword
algorithm
statement
19
Which term refers to a series of steps for solving a problem or carrying out a task?
decomposition
level of abstraction
pattern
algorithm
20
Which phrase describes Boolean literals?
data such as letters, symbols, words, and sentences
the words True and False not enclosed in single or double quotes
named memory locations that hold data that is not changed
words used by a programming language for a specific purpose
21
A development environment is a tool for coding instructions and executing programs on a digital device.
False
True
22
The Hello World! program is typically the first program written by aspiring programmers learning a new language.
False
True
23
The convention in C++, Java, and Python is to name constants in all uppercase with an underscore separating words.
False
True
24
Which item is the name of a popular programming language?
iOS SDK
Windows Notepad
Visual Studio
C++
25
Which example leads to an algorithm design used for an everyday technology application?
The payment process at an online store
Making a frozen pizza in a toaster oven
A recipe for baking brownies
The steps for changing a tire
26
Which list identifies all data characterized by the character data type?
floating point numbers, integers, binary numbers
binary numbers, hex numbers, and Boolean variables
a single letter of the alphabet, a symbol, or a numeral from 0 to 9
Boolean variables, a symbol, E notation
27
A compiler uses ____ as input and generates ____ as output.
source code; object code
object code; source code
object files; binary executable files
binary executable files; object files
28
A numeric literal consists of digits representing integers or floating-point numbers.
True
False
29
What is the floating-point E notation format for .1234?
1.234E-1
1.234E+1
.1234
.1234E
30
Digits are stored as ASCII codes, but integer numbers are stored as binary numbers.
False
True
31
Which statement best describes a computer program?
series of patterns that serve as the blueprints for a programming algorithm
set of instructions executed by a digital device to perform a specific task
set of instructions executed in an application that specify the attributes
A set of steps defining logic and structure for classification in an app
32
Which list of literals contains only integer and floating-point literals?
0b00000011, 3, “3.0”
3, 3.03e+3, “3.0”
0b00000011, 3, 0x3C
3, 0x3C, “3.0”
33
Why are primitive data types useful to programmers?
They give more control by letting prog define data manipulation and storage
They are the simplest variables and need no functions for data manipulation
They save time by specifying what to do with data, not how to do it.
They aren't built-in but can be created using composite data types.
34
Which characteristic does not apply to floating-point number data types?
Floating-point number have a decimal point with at least one digit after it
Floating-point numbers can be expressed in decimal notation or E notation
Floating-point numbers can be positive or negative.
Floating-point number are stored in conventional binary format or Enotation
35
Which list contains four common primitive data types?
character, integer, floating-point, and double floating-point
floating-point, double floating-point, wide, double-wide
character, integer, floating-point, and double-wide
character, integer, wide, and double-wide