Answer to Question #320622 in C++ for nickname

Question #320622

Which of the following is NOT one of the reasons why global variables may be a bad idea (according to your author)?


A variable in main() with the same name as a global variable causes compiler and runtime errors.

Global variables make a program hard to understand.

Global variables make debugging difficult.

If you want to use a function in another program and this function depends on a global variable, you will have to redesign it.


1
Expert's answer
2022-04-01T02:10:12-0400

Answer:

A variable in main() with the same name as a global variable causes compiler and runtime errors.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog