proc() {

static i=10;
printf("%d",i);
}

If this proc() is called second time, what is the output?

Answer Posted / vignesh1988i

if it is called for second time also ,it will be 10 only but
in a different thought....

static keyword is only one time initilization....if the
compailer when again reads the same line it blindly ignores
it and print the latest value of yhat static variable

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is fortran still used in 2018?

687


Why is c platform dependent?

708


What is clrscr ()?

723


Can include files be nested? How many levels deep can include files be nested?

739


Can we compile a program without main() function?

738






Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.

3794


What is LINKED LIST? How can you access the last element in a linked list?

713


What is the benefit of using #define to declare a constant?

712


How can I implement sets or arrays of bits?

695


Which is the memory area not included in C program? give the reason

1602


Explain union. What are its advantages?

704


Who invented bcpl language?

810


What is the difference between a function and a method in c?

659


What does typedef struct mean?

771


The __________ attribute is used to announce variables based on definitions of columns in a table?

784