Explanation: When static storage class is given, it is initialized once. The change in the value of a static variable is retained even between the function calls. Main is also treated like any other ordinary function, which can be called recursively.
i think 5 will be continously printed and there will be no break
ReplyDeletewrong dude
ReplyDeleteas the variable is declared as static then output will be
ReplyDelete1
2
3
4
5
Explanation:
ReplyDeleteWhen static storage class is given, it is initialized once. The change
in the value of a static variable is retained even between the function calls. Main
is also treated like any other ordinary function, which can be called recursively.