Given the following C programfunc(){static int i = 10;printf("%d",i);i++;}What is the value of i if the function is called twice?

Showing Answers 1 - 7 of 7 Answers

Meenal

  • Jul 28th, 2005
 

i=12

  Was this answer useful?  Yes

Amit dhamija

  • Aug 14th, 2005
 

value of I will be 12 as I is declared as static variable(static variables are initialized only once)

  Was this answer useful?  Yes

himanshu

  • Nov 3rd, 2006
 

12

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions