Global variables | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Global variables

If a global variable is declared and it's value is defined within the main function can that variable be used in another sub function. will its value be retained from the main function in the sub function?

26th Nov 2018, 4:37 AM
Gig Hazard
Gig Hazard - avatar
1 Antwort
+ 1
Why don't you try this in playground ?
26th Nov 2018, 10:12 AM
Prokopios Poulimenos
Prokopios Poulimenos - avatar