+ 1
Why the use of Global Variables discouraged?
I submitted a program as an assignment in my Data Structures Course, the program was correct but I was not given full score and the teacher said that the reason of deduction of marks is due to usage of Global Variables in my program.
2 Réponses
+ 3
Because global variables are accessible from entire program and can be changed easily this may cause bugs.....
Maybe I am wrong but I thik that is the reason