Chapter 6 Review Questions Flashcards

1
Q

Which of the following numbers is written in hexadecimal format?

A. 100101
B. 3268
C. 18AF
D. 100101.11

A

18AF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which of the following terms describe concepts related to breaking code into smaller, repeatable sections? (Choose two.)

A. Functions 
B. Variables 
C. Containers
D. Methods
E. Objects
A

Functions

Methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following are examples of object-oriented programming languages? (Choose two.)

A. Java

B. XML

C. Python

D. C

E. SQL

A

Java

Python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following statements is true regarding arrays and vectors?

A. Arrays contain one data type and are dynamic in length. Vectors can have multiple data types and are fixed in length.

B. Arrays can have multiple data types and are fixed in length. Vectors have one data type and are dynamic in length.

C. Arrays can have multiple data types and are dynamic in length. Vectors have one data type and are fixed in length.

D. Arrays contain one data type and are fixed in length. Vectors can have multiple data types and are dynamic in length.

A

Arrays contain one data type and are fixed in length. Vectors can have multiple data types and are dynamic in length.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A developer needs to use a code designation for non-English letters. Which notational system does the developer need to use?

A. ASCII

B. Unicode

C. International

D. Strings

A

Unicode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which of the following are examples of interpreted languages? (Choose two.)

A. Compiled

B. Query

C. Scripted

D. Markup

A

Scripted

Markup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What type of high-level programming language is translated into machine code once and then executed many times?

A. Compiled

B. Scripted

C. Scripting

D. Markup

A

Compiled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A programmer wants to write code that directly accesses the computer’s hardware. Which is the best type of language for the programmer to use?

A. Complied

B. Query

C. Interpreted

D. Assembly

A

Assembly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Interpret the following logic. For data input on someone who is 20 years old, which category will they fall into?
if age < 13, then category “Child”
else if age < 20, then category “Teen”
else if age < 65, then category “Adult”
else category “Senior”

A. Child

B. Teen

C. Adult

D. Senior

A

Adult

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A programmer is writing a program that needs to accept an input of someone’s name. What type of variable should the programmer create?

A. Char

B. String

C. Float

D. Unicode

A

String

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Looping logic makes use of which of the following statements?

A. while

B. when

C. loop

D. if

A

while

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In object-oriented programming, which of the following are integral parts of objects? (Choose two.)

A. Arrays

B. Properties

C. Attributes

D. Variables

A

Properties

Attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A program shows the number 11010.11. Which data type is this?

A. Binary

B. Boolean

C. Integer

D. Float

A

Float

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

You have created an array that can hold 15 items, all of the integer data type. You want to add a 16th integer. Which of the following is the best approach to doing this?

A. Add it to the existing array.

B. Create a separate variable for the 16th integer.

C. Convert the integers to floats and add the 16th integer.

D. Create a vector and replace the array with it.

A

Create a vector and replace the array with it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What type of programming language is designed to retrieve data from a database?

A. Query

B. Assembly

C. Interpreted

D. Compiled

A

Query

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Interpret the following logic. A law enforcement agency has received data indicating that there are ten current threats to public safety. What should the threat level be?

if threats < 3, then level “Green”
else if threats < 6, then level “Yellow”
else if threats < 9, then level “Orange”
else if threats < 12,
then level “Red” else level “Emergency”

A. Green

B. Yellow

C. Orange

D. Red

E. Emergency

A

Red

17
Q

Which of the following is an example of a markup language?

A. SQL

B. XML

C. Python

D. Java

A

XML

18
Q

You want to understand the sequence of a program, from start to finish. Which of the following is the best to use for this purpose?

A. Pseudocode

B. Function

C. Flowchart

D. Object

A

Flowchart

19
Q

Which of the following programming language types is the lowest-level language?

A. Interpreted

B. Compiled

C. Query

D. Assembly

A

Assembly

20
Q

Flowcharts depict which one of the following?

A. Programs

B. Objects

C. Functions

D. Identifiers

A

Programs