Demo program for using static variables in a method in C language:
What is the output of below c program?
static int i=10;
it prints 10,11,12. since i is a static variable its value will be persisting between function calls. Static variables will be created only once and its life time will be through out the program execution.
Back To Top