If I declare a string variable named “color” in main, do I need to repeat the declaration in the program functions (assuming the function needs the color variable)?
What will be an ideal response?
Yes, I need to declare color in the functions because locally declared variables inside functions are owned by that function, and can’t be seen/used by other functions. (Except if the variable’s address is passed to another function.)
You might also like to view...
Select the true statement below.
a. Placing white space around graphics and headings helps them to stand out. b. There is no need for a lot of navigation because web site visitors can just use the back button. c. Very small text is good to use for web site appealing to the baby-boomer and older market. d. Children like sites with dark colors.
?Using Office Mix, you can (select all that apply)
A. ?record yourself on video. B. ?capture still and moving images on your desktop. C. ?insert interactive elements sucha as quizzes and live webpages directly into PowerPoint slides. D. ?post presentations to OneDrive, but only one viewer at a time can watch them.