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
What do mean by network ?
Explain how do you generate random numbers in c?
When was c language developed?
What type of function is main ()?
What is the use of getchar functions?
explain how do you use macro?
What is the difference between strcpy() and memcpy() function in c programming?
Explain what are compound statements?
What are register variables? What are the advantage of using register variables?
What is the difference between void main and main in c?
What is unsigned int in c?
What is the scope of static variable in c?
What is c system32 taskhostw exe?
How can I recover the file name given an open stream or file descriptor?
What is the difference between printf and scanf )?