πŸ“Š Object Oriented Programming (OOP)
Q. A function’s single most important role is to
  • (A) give a name to a block of code.
  • (B) reduce program size.
  • (C) accept arguments and provide a return value.
  • (D) help organize a program into conceptual units.
πŸ’¬ Discuss
βœ… Correct Answer: (D) help organize a program into conceptual units.
πŸ“Š Object Oriented Programming (OOP)
Q. A function argument is
  • (A) a variable in the function that receives a value from the calling program.
  • (B) a way that functions resist accepting the calling program’s values.
  • (C) a value sent to the function by the calling program.
  • (D) a value returned by the function to the calling program.
πŸ’¬ Discuss
βœ… Correct Answer: (C) a value sent to the function by the calling program.
πŸ“Š Object Oriented Programming (OOP)
Q. When a function returns a value, the entire function call can appear on the right side of the equal sign and be assigned to another variable.
  • (A) true
  • (B) false
  • (C) ---
  • (D) ---
πŸ’¬ Discuss
βœ… Correct Answer: (A) true
πŸ“Š Object Oriented Programming (OOP)
Q. When an argument is passed by reference
  • (A) a variable is created in the function to hold the argument’s value.
  • (B) the function cannot access the argument’s value.
  • (C) a temporary variable is created in the calling program to hold the argument’s value.
  • (D) the function accesses the argument’s original value in the calling program.
πŸ’¬ Discuss
βœ… Correct Answer: (D) the function accesses the argument’s original value in the calling program.

Jump to