C program to demonstrate the static and local variables
kw.c
Output
kodingwindow@kw:~$ gcc kw.c
kodingwindow@kw:~$ ./a.out Static:a = 1 | Local:b = 1 Static:a = 2 | Local:b = 1 Static:a = 3 | Local:b = 1 Static:a = 4 | Local:b = 1 Static:a = 5 | Local:b = 1 kodingwindow@kw:~$
Advertisement