proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
Answer Posted / sujith
I dont know how can it be 11 next time.
I agree that static variables are assigned only once, and
allocation is happening to the data segment, but it doesnt
mean that is going to change the value on its own, until u
do that manually.
U call this program for n times, the answer is going to be 10.
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
Whats s or c mean?
C language questions for civil engineering
Explain can static variables be declared in a header file?
What is oops c?
How does free() know explain how much memory to release?
Explain modulus operator.
Wt are the Buses in C Language
When should we use pointers in a c program?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
Can you write the algorithm for Queue?
What should malloc(0) do?
What is queue in c?
Write a code to generate a series where the next element is the sum of last k terms.
What is 2 d array in c?
Who is the main contributor in designing the c language after dennis ritchie?