Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

Static Variable C

#include <stdio.h>
void display();

int main()
{
    display();
    display();
}
void display()
{
    static int c = 1;
    c += 5;
    printf("%d  ",c);
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Static #Variable #C
ADD COMMENT
Topic
Name
1+2 =