In C, suppose var1 is a variable in foo1() and foo2() wants to access var1, however, foo1() doesn\'t call foo2(), so we can\'t pass it by parameter. At the same time, only foo1(
You need to declare var1 outside the scope of the functions and then send it as a parameter to both. Alternatively, declare it as a global variable.
var1