In the code below, why is it that the displayName() module cannot print the person's name?
Start
Call getInput()
Call displayName()
Stop
Module getInput()
Declare String name
Display "Enter your name: "
Input name
End Module
Module displayName()
Display "Your name is: " + name
End Module
A) The name variable is outside the displayName() module's scope.
B) The name variable is a global variable.
C) The name variable is strongly cohesive.
D) The name variable has high coupling.
Correct Answer:
Verified
Q29: When output is meant for the screen,
Q30: When output is meant for a printer,
Q31: _ are created when a module is
Q32: With modular programming, a variable's _ is
Q33: _ are available to all modules in
Q35: In which of the following is the
Q36: Why is it that all variables are
Q37: What happens if a module uses a
Q38: _ are values represented as constants or
Q39: Which of the following statements is true?
A)
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents