0 votes
in Sql by

What are local and global variables and their differences?

1 Answer

0 votes
by
Local variables are the variables which can be used or exist inside the function. They are not known to the other functions and those variables cannot be referred or used. Variables can be created whenever that function is called.

Global variables are the variables which can be used or exist throughout the program. Same variable declared in global cannot be used in functions. Global variables cannot be created whenever that function is called.

Related questions

0 votes
asked Jan 11 in C Plus Plus by GeorgeBell
0 votes
asked Jan 6 in C Plus Plus by GeorgeBell
...