The actual answer (but not one you will like) is that you can use pointers so that other functions can change a value of a parameter passed to it.
That means you can declare a variable in one function, pass it as a parameter to a different function (by reference not by value), that function changes that variable's value and when it returns to the calling function the value will have been updated.
The downside is that you will spend the next year figuring out pointers and see how easy it is to corrupt the entire run-time stack by getting it wrong (don't ask me how I know this).
So the correct answer for you, is to declare them (as globals) outside of any function but take note of what sterretje warns about - therein lies the risk of a value changing unexpectedly under your feet and can be a devil to debug. More than a couple of globals might indicate a fundamental program design issue.