Skip to content

mfagri/my_global

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

my_global

this function can be used instead of global variable.

if i==0 the function return 0 && if i ==1 the function return 1 && else the function return the value stored in the static variable.

Static variables have a property of preserving their value even after they are out of their scope! Hence, static variables preserve their previous value in their previous scope and are not initialized again in the new scope. Syntax :

static data_type var_name = var_value;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages