proc() {

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

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

Answer Posted / saurabh

does static function increment the counter variable by
one?? if not then how can u say that i value will be
incremented by 1.
finally the i value will be 10 only. it will not
increment.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is variable initialization and why is it important?

712


Which of these functions is safer to use : fgets(), gets()? Why?

727


Explain how can you be sure that a program follows the ansi c standard?

959


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

672


How do you print only part of a string?

693






Explain what are the advantages and disadvantages of a heap?

706


hi any body pls give me company name interview conduct "c" language only

1771


what is event driven software and what is procedural driven software?

2116


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

673


Can you think of a logic behind the game minesweeper.

2103


Why are all header files not declared in every c program?

700


What is a rvalue?

837


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

1220


How can I send mail from within a c program?

664


How to get string length of given string in c?

698