What does static mean in c?
Answer / sasi
Whenever Static is used with a Variable declaration .. it defines that the last updated value of the Variable will not be deleted after the process of a program .
Eg : #include <stdio.h>
int main() {
func();
func();
func();
}
void func() {
static int i=2;
i=i+1;
printf("%d
",i);
return 0;
}
Output :
3
4
5
| Is This Answer Correct ? | 0 Yes | 0 No |
What is malloc and calloc?
What is the difference between void main and main in c?
What is meant by operator precedence?
Do you know pointer in c?
what will be printed by this printf? printf("%c",printf("hi")["sharkselva"])); }
What are variables c?
How does free() know how many bytes to free?
WRITE A PROGRAM TO FIND A REVERSE OF TWO NO
List a few unconditional control statement in c.
What are valid signatures for the Main function?
Can static variables be declared in a header file?
What is the difference between exit() and _exit()?