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
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
What is the use of parallelize in spark?
Are bit fields portable?
How can you increase the size of a dynamically allocated array?
how to write optimum code to divide a 50 digit number with a 25 digit number??
What is meant by operator precedence?
Write a program to generate random numbers in c?
please explain every phase in the "SDLC" in the dotnet.
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
Is fortran still used in 2018?
What is a header file?
How can I recover the file name given an open stream?
Describe newline escape sequence with a sample program?
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent
What is use of #include in c?