#include void func() { static int x = 0; // x is initialized only once across three calls of // func() printf(\"%d\\n\"
You can't. It's a local static variable which is invisible outside func().
func()
You can either use: