double g(int a, double d){ return a * d; } void f(double p){ int i = 0; double result; // Local variable result declared before the first statement. //... if (p <= 10.0) i++; // Some statements here //... result = g(i,p); // result first used much later in the function. /* The rest of f comes here */ } int main(){ f(5.0); }