In which of the following is the variable name declared as a global variable?
A) 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
B) Start
Call getInput()
Call displayName()
Stop
Module getInput()
Display "Enter your name"
Input name
End Module
Module displayName()
Declare String name
Display "Your name is: " + name
End Module
C) Start
Call name
Call getInput()
Call displayName()
Stop
Module getInput()
Display "Enter your name"
Input name
End Module
Module displayName()
Declare String name
Display "Your name is: " + name
End Module
D) Start
Declare String name
Call getInput()
Call displayName()
Stop
Module getInput()
Display "Enter your name"
Input name
End Module
Module displayName()
Display "Your name is: " + name
End Module
Correct Answer:
Verified
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
Q34: In the code below, why is it
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)
Q40: Sending the value of a variable or
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