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 type qualifiers?
what is the difference between postfix and prefix unary increment operators?
How can draw a box in cprogram without using graphics.h header file & using only one printf(); ?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What is modeling?
How can I read a directory in a c program?
write a programme that inputs a number by user and gives its multiplication table.
How to write c functions that modify head pointer of a linked list?
what is the c source code for the below output? 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1
logic for generating all the combinations of the any number of given letters. ex::::::::: if a,b,c,d are given the o/p should be abcd,dcba,dbac,bcad,................ 4*3*2*1 combinations............
Where are the auto variables stored?
what are the advantage of pointer variables? write a program to count the number of vowels and consonants in a given string