Demo on the uses of the static reserved word

This commit is contained in:
kdeng00
2020-11-04 21:20:39 -05:00
parent faa919d6ed
commit 47e0041c86
4 changed files with 86 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
/*
*
* Demonstration of static variables (External and internal) and functions.
*
* Author: Kun Deng
*/
#include <stdio.h>
#include <number.h>
int main()
{
const int number_limit = 10;
printf("Printing %d numbers\n", number_limit);
for (int i = 0; i != number_limit; ++i)
{
printf("%d: %d\n", i, Number_get_number());
}
return 0;
}