11.7. Homework 7 - Using a Static Local VariableΒΆ
See also
Write a C program that uses a function with a static (storage class) local variable to print out an asterisk character (*) and a space character for each time it was called. For example, the following loop would print the output shown below it.
#include <stdio.h>
void howmany( void );
int main(void) // This is all that is needed in main.
{
int i;
for(i = 0; i < 3; i++)
howmany();
return 0;
}
*
* *
* * *