What is the scope of static variables in c language?
Answer / 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 |
What are type modifiers in c?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
what are threads ? why they are called light weight processes ? what is the relation between process and threads ?
main() {int a=200*200/100; printf("%d",a); }
main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }
which one is not preprocessor directive a)#if b)#elif c)#undef d)#pragma
16 Answers Accenture, Infosys, TCS, Wipro,
Can you add pointers together? Why would you?
Explain spaghetti programming?
What is a pointer and how it is initialized?
Describe how arrays can be passed to a user defined function
Differentiate between a for loop and a while loop? What are it uses?
What are the __date__ and __time__ preprocessor commands?