Foundations Actual Exam Practice
Questions with Verified Answers | Latest
Edition
1. What are arguments? - ANSWER Any function input values that appear
within parentheses and are separated by commas if more than one.
2. What is Moore's Law? - ANSWER The observation that the number of
transistors on a microchip doubles approximately every two years, leading to
increased performance.
3. What is an expression? - ANSWER Can be a number, a variable name, or a
simple calculation like (numApples + 1).
4. What happens when you divide a nonzero floating-point number by zero? -
ANSWER It results in Infinity or -Infinity.
5. What is a logical operator? - ANSWER An operator that treats operands as
true or false and evaluates to true or false.
6. What is an operator? - ANSWER A symbol that performs a built-in
calculation, such as + for addition.
7. What is a reserved word? - ANSWER A word that is part of the
programming language and cannot be used as an identifier.
,8. What is a do-while loop? - ANSWER A loop that first executes the loop
body's statements and then checks the loop condition.
9. What is a floating-point number? - ANSWER A number that can represent
decimal points, allowing for a wide range of values.
10.What is the Waterfall Approach? - ANSWER A software development
methodology that carries out the phases of the Software Development Life
Cycle (SDLC) in sequence.
11.What is a function definition? - ANSWER A sequence that consists of the
new function's name and a block of statements.
12.What is a branch? - ANSWER A sequence of statements that is executed
only under a certain condition.
13.What is an algorithm? - ANSWER A sequence of steps that solves a
program, generating correct output for any valid input values.
14.What is a constant? - ANSWER A named value item that holds a value that
cannot change.
15.What is an identifier? - ANSWER A name created by a programmer for an
item like a variable or function, which must be a sequence of letters,
underscores, and digits, starting with a letter or underscore, and is case
sensitive.
16.What is Incremental Development? - ANSWER A process in which a
programmer writes and tests a few statements, then writes and tests a small
amount more.
,17.What is a variable declaration? - ANSWER A statement that declares a new
variable, specifying the variable's name and type.
18.What is lower camel case? - ANSWER A naming convention where each
word is capitalized except for the first, as in 'numApples'.
19.What is an activity diagram? - ANSWER A flowchart of an activity (loop,
function, etc.) within the program.
20.What is a Use Case? - ANSWER A description of a singular goal of one
user and a brief outline of how they will accomplish that goal.
21.What is Pseudocode? - ANSWER Text that resembles a program in a real
programming language but is simplified to aid human understanding.
22.What is an integer? - ANSWER A variable type that can hold whole
numbers.
23.What is an element? - ANSWER Each item in an array.
24.What is a divide-by-zero error? - ANSWER An error that occurs at runtime
if a divisor is 0, causing a program to terminate.
25.What is a modulo operator? - ANSWER An operator that evaluates to the
remainder of the division of two integer operands, e.g., 23 % 10 is 3.
, 26.What is a relational operator? - ANSWER An operator that checks how one
operand's value relates to another, such as >=.
27.What is an array? - ANSWER A special variable having one name, but
storing a list of data items, with each item being directly accessible.
28.What is Epsilon? - ANSWER The difference threshold indicating that
floating-point numbers are equal.
29.What is output? - ANSWER Data that a program puts somewhere, such as
to a file, screen, or network.
30.What is a function? - ANSWER A list of statements executed by invoking
the function's name, with such invoking known as a function call.
31.What is a comment? - ANSWER Text a programmer adds to a program,
which is read by humans (other programmers) but ignored by the program
during execution.
32.What does ASCII stand for? - ANSWER American Standard Code for
Information Interchange, which is a character encoding standard.
33.What is a program? - ANSWER A list of statements, each carrying out
some action and executing one at a time.
34.What is a return statement? - ANSWER A statement that returns the
specified value and immediately exits the function.