proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
Answer Posted / jeevan
There is not increment statement. In this case, always it
returs 10 only. even if 'i' is not static type, then also
it returns 10 only....... for confusing in interview, they
might have used 'static' key word here.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are disadvantages of C language.
What is a global variable in c?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
Difference between linking and loading?
Why dont c comments nest?
What is the usage of the pointer in c?
What is the process to generate random numbers in c programming language?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is queue in c?
What is the value of h?
What is your stream meaning?
Explain what are the different data types in c?
Explain what is wrong with this program statement?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol