CSE 240 MIDTERM HIGH-YIELD RECURSION,
SORTING, AND COMPLEXITY ANALYSIS
SUMMARY 2026
◉ Converting an integer value 5 to a float number 5.0 takes
Answer: At least one important machine instruction to perform
conversion between data binary formats.
◉ Explicit type conversion is commonly refer to as __________ .
Answer: Casting
◉ Which of the following statements are correct if a language is
strongly typed. Select all that apply.
Answer: Each name in a program has a single type associated with it
and type errors are always reported.
◉ Type checking happens during compilation phase. It reinforces
which of the following structural layers?
Answer: Contextual
,◉ The imperative programming paradigm is popular and is a part of
object-oriented computing paradigm, because it ____ (Select all
answers that apply).
Answer: Matches the common culture of doing things by following
the step-wise instructions and is based on computer organization
and thus is efficient to execute on hardware.
◉ In C, what function can be used for inputting a string containing
spaces?
Answer: fgets();
◉ The forward declaration of a function requires: (Select all answers
that apply)
Answer: parameter types, return type, and function name
◉ Where is the main() function located in a C++ program?
Answer: Outside any class
◉ A variable declaration can involve the following attributes: (Select
all answers that apply)
Answer: type and scope
◉ A data type defines the
Answer: values and operations allowed
, ◉ In a given programming and execution environment, a variable
declaration in C binds a name to a memory location. What else are
also determined in declaration? Select all that apply.
Answer: Variable size (number of bytes), variable scope, variable
type
◉ In the memory hierarchy of a computer system, which type of
memory is the fastest one?
Answer: Registers
◉ Which of the following C declarations (contextual level) will cause
a compilation error?
Answer: int d[] = {12.24, 47.13};
◉ Given the C declaration: char s1[4], s2[ ] = "hello"; if a string copy
function strcpy(s1, s2) is executed, what will happen?
Answer: The result s1 will contain the string "hell", and the
following two byte locations will contain 'o' and '\0'.
◉ Assume this is a 32-bit environment, given a declaration: int
a[10]; What is the size (in bytes) of the entire array?
Answer: 40
SORTING, AND COMPLEXITY ANALYSIS
SUMMARY 2026
◉ Converting an integer value 5 to a float number 5.0 takes
Answer: At least one important machine instruction to perform
conversion between data binary formats.
◉ Explicit type conversion is commonly refer to as __________ .
Answer: Casting
◉ Which of the following statements are correct if a language is
strongly typed. Select all that apply.
Answer: Each name in a program has a single type associated with it
and type errors are always reported.
◉ Type checking happens during compilation phase. It reinforces
which of the following structural layers?
Answer: Contextual
,◉ The imperative programming paradigm is popular and is a part of
object-oriented computing paradigm, because it ____ (Select all
answers that apply).
Answer: Matches the common culture of doing things by following
the step-wise instructions and is based on computer organization
and thus is efficient to execute on hardware.
◉ In C, what function can be used for inputting a string containing
spaces?
Answer: fgets();
◉ The forward declaration of a function requires: (Select all answers
that apply)
Answer: parameter types, return type, and function name
◉ Where is the main() function located in a C++ program?
Answer: Outside any class
◉ A variable declaration can involve the following attributes: (Select
all answers that apply)
Answer: type and scope
◉ A data type defines the
Answer: values and operations allowed
, ◉ In a given programming and execution environment, a variable
declaration in C binds a name to a memory location. What else are
also determined in declaration? Select all that apply.
Answer: Variable size (number of bytes), variable scope, variable
type
◉ In the memory hierarchy of a computer system, which type of
memory is the fastest one?
Answer: Registers
◉ Which of the following C declarations (contextual level) will cause
a compilation error?
Answer: int d[] = {12.24, 47.13};
◉ Given the C declaration: char s1[4], s2[ ] = "hello"; if a string copy
function strcpy(s1, s2) is executed, what will happen?
Answer: The result s1 will contain the string "hell", and the
following two byte locations will contain 'o' and '\0'.
◉ Assume this is a 32-bit environment, given a declaration: int
a[10]; What is the size (in bytes) of the entire array?
Answer: 40