Question: Which two statements describe advantages to using programming libraries?

Answer Options:
A) Using a library minimizes copyright issues in coding.
A) program that uses libraries is more portable than one that does not.
C) The programmer can improve productivity by using libraries.
D) Libraries always make code run faster.
E) Using libraries turns procedural code into object-oriented code.
F) Using a library prevents a programmer from having to code common tasks by hand.

Answer: C) The programmer can improve productivity by using libraries.; F) Using a library prevents a programmer from having to code common tasks by hand.

Question: Which two situations would be helped by using a programming library?

Answer Options:
A) programmer is developing a database application that can house various types of data. The software cannot know ahead of time the data type, and so the programmer needs variables that do not require an initial declaration type.
A) programmer needs to write several interacting objects for a student gradebook application, some of which need an inheritance structure.
A) programmer is writing a piece of mathematical code that requires the heavy use of recursive functions.
A) programmer needs to perform a series of file compression tasks. These tasks are commonly performed by programmers, and the programmer does not want to have to code them all by hand
A) video game programmer needs to perform several animation tasks, all of which are very common in the industry. The programmer does not want to have to code each task, and they are unsure if they even know how to code a few of them.
A) programming student is writing code to iterate through the integers in a list and determine the maximum.

Answer: D, E. A programmer needs to perform a series of file compression tasks. A video game programmer needs to perform several animation tasks.

Question: What is an advantage of using a programming library?

Answer Options:
A) There is improved programmer productivity.
B) Programs need not run to yield results.
C) Static program elements are visualized.
D) There are more statements in a user’s main function.

Answer: A) There is improved programmer productivity.

Question: A programmer is writing code using C. Which paradigm could the programmer be using?

Answer Options:
A) functional paradigm using dynamic types
B) An event-driven paradigm using static types
A) procedural paradigm using static types
A) procedural paradigm using dynamic types

Answer: C) A procedural paradigm using static types

Question: Which language has extensive support for object-oriented programming?

Answer Options:
A) C++
B) C
C) HTML
D) Markup

Answer: A) C++

Question: One requirement for the language of a project is that it is based on a series of method calls. Which type of language is characterized in this way?

Answer Options:
A) Markup
B) Compiled
C) Static
D) Functional

Answer: D) Functional

Question: A software engineer has written a program that uses a large number of interacting custom data types, information hiding, data abstraction, encapsulation, polymorphism, and inheritance. Variables do not need to receive their types ahead of time, and this program can run on a variety of operating systems without having to re-compile the program into machine code. Which type of language is being used?

Answer Options:
A) Object-oriented
B) Procedural
C) Interpreted
D) Markup
E) Static
F) Dynamic

Answer: Object-oriented, Interpreted, Dynamic

Question: Which kind of language is HTML?

Answer Options:
A) Dynamically typed
B) Markup
C) Statically typed
D) Object-oriented

Answer: B) Markup

Question: What is a feature of C# as a programming language?

Answer Options:
A) The code runs directly one statement at a time by another program called a compiler.
B) The code must be compiled into machine code in the form of an executable file before execution
C) The program usually runs slower than an interpreted language.
D) The code does not require being translated into machine code but can be run by a separate program called a compiler.

Answer: B) The code must be compiled into machine code in the form of an executable file before execution

Question: What is a characteristic of an interpreted language?

Answer Options:
A) Can be run by a user one statement at a time
B) Generates syntax errors during compilation
C) Has a programmer writing machine code
D) Is restricted to running on one machine

Answer: A) Can be run by a user one statement at a time

Question: Which kind of languages are C, C++, and Java?

Answer Options:
A) Markup
B) Machine code
C) Compiled
D) Interpreted

Answer: C) Compiled

Question: Which characteristic distinguishes a markup language from other languages?

Answer Options:
A) It allows variables to change type during execution.
B) It requires fewer variables and variable conversions than other languages because the types can change during execution.
C) It supports decomposing programs into custom types that often combine with other variable types into more complicated concepts.
D) It does not perform complex algorithms, but instead describes the content and formatting of webpages and other documents.

Answer: D) It does not perform complex algorithms, but instead describes the content and formatting of webpages and other documents.

Question: What is one characteristic of an object-oriented language that is not a characteristic of a procedural or functional language?

Answer Options:
A) The language is optimized for recursive programming.
B) The language is based on the concept of modular programming and the calling of a subroutine.
C) The language supports decomposing a program into objects that interact with one another.
D) The language treats programs as evaluating mathematical functions.

Answer: C) The language supports decomposing a program into objects that interact with one another.

Question: Which characteristic specifically describes an object-oriented language?

Answer Options:
A) Requires a compiler to convert to machine code
B) Supports creating programs as items that have data plus operations
C) Supports creating programs as a set of functions
D) Can be run on any machine that has an interpreter

Answer: B) Supports creating programs as items that have data plus operations

Question: Which operator is helpful in determining if an integer is a multiple of another integer?

Answer Options:
A) &
B) /
C) |

Answer: B) /

Question: Which operation should be used to check if the difference of two values is greater than 1?

Answer Options:
A) Addition
B) Division
C) Subtraction
D) Multiplication

Answer: C) Subtraction

Question: Which value would require an integer as a data type?

Answer Options:
A) An approximation of the number pi to five decimal places
B) The number of students in a section
C) The cost of a dinner including tax and tip
D) The weights of every patient involved in a pharmaceutical trial

Answer: B) The number of students in a section

Question: What would a string be used to store?

Answer Options:
A) positive whole number
B) The word “positive”
A) true/false indication of whether a number is composite
A) positive number between 2 and 3

Answer: B) The word “positive”