Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

c static variables

int fun(int i);
int main()
{
	int i, j;
	for(i=0;i<=5;i++)
	{
		j = fun(i);
	}
	printf("%d", j);	
}
fun(int i)
{
	static int count = 0;
	count = count + 1;
	return count;
}
Source by learningmonkey.in #
 
PREVIOUS NEXT
Tagged: #static #variables
ADD COMMENT
Topic
Name
4+6 =