Computer Science, asked by Duryodhan4727, 1 year ago

Difference between local and global variable in c++

Answers

Answered by pkjoshi1997
0

Answer:

Local Variables can be called as private whereas, global variables can be called as public

Explanation:

Local variables are limited only to the function in which they are created, they don't have any existence out of the function .

Global variables can be called or used throughout the program, these can be accessed at any position in the program  

Similar questions