Initiallizing local variables

ash901226:
now i know what static does, so this way i do not need to declare to may global variable now huh.

No you don't. There are lots of different static so keep an open mind for next time it may mean something else.
If you want a variable only that function needs to access, you can use static. Non static local variables are released after function call so memory is free for other things. Static variables are kept so don't define too many of them.