Sample Questions

You're viewing a limited preview. Log in and subscribe to access all questions.

Exam Questions

Question 1
What are two characteristics of programming libraries? (Choose 2 answers)
A. A single program can only include one library.
B. The functions in a single library usually serve a common purpose.
C. All of a language's libraries are automatically included in a program.
D. Using libraries will always make a program run less efficiently.
E. A single library normally includes more than one function.
F. One library will contain one function but can have several variables.
Correct Answer: B,E
Rationale: In programming, libraries organize related functions and typically contain multiple functions . program may include many libraries ( false). In programming, libraries are not auto-included ( false). They often improve rather than harm efficiency ( false). library rarely contains only one function ( false).
Question 2
Which function would likely be found in the same library as one that produces a random number?
A. Sorting an array of values
B. Producing a random character
C. Multiplying two numbers together
D. Asking the user for a number
Correct Answer: B
Rationale: In programming, libraries group related functionality. random-number library often also includes functions to generate random characters (derived by mapping random numbers to character sets). Sorting belongs to algorithms/collections, multiplication is a primitive operation, and user input is I/O.
Question 3
What is an advantage of using programming libraries?
A. They are compiled with the main program
B. They save hard disk space
C. They save development time
D. They are loaded into memory
Correct Answer: C
Rationale: In programming, libraries provide reusable, tested code that speeds development . Some are compiled/linked at different stages ( not inherent). In programming, libraries donAat inherently save disk space . Loading into memory is not the key advantage.
Question 4
Which language could be used to code using a functional programming paradigm?
A. CSS
B. HTML
C. Python
D. LaTeX
Correct Answer: C
Rationale: Python supports functional programming (firstAaa class functions, lambdas, map/filter/reduce). CSS and HTML are not programming languages; LaTeX is for document preparation.
Question 5
Which language has extensive support for objects?
A. HTML
B. Java
C. C
D. Markup
Correct Answer: B
Rationale: Java is designed around classes/objects. HTML/AaEMarkupAa are not programming languages; is procedural and lacks builtAaa in OOP.