What is the scope of static variables in c language?
Answer Posted / dhanshri chabukswar
in c language the scope of a static variable depends on where it is declared
void func(){
static int x=0;
x++;
printf("%d",x);
}
scope - is x
out put- 123 if you call func()three times
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
What are the two forms of #include directive?
What is the value of uninitialized variable in c?
Why do some versions of toupper act strangely if given an upper-case letter?
Explain what is the difference between a free-standing and a hosted environment?
Why calloc is better than malloc?
Write a program to reverse a linked list in c.
What are keywords in c with examples?
Explain how do you search data in a data file using random access method?
What is #include stdio h?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
How many bytes are occupied by near, far and huge pointers (dos)?
What is uint8 in c?
Explain goto?