Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Example 4 of using function and local variables in functions

Posted By: Vilmos Fischer     Category: C Programming     Views: 3067

Example 4 of using function and local variables in functions.

Code for Example 4 of using function and local variables in functions in C Programming

int i =0;          //Global variable  /A
main()
{
int i ;            // local variable for main   / Bvoid f1(void)  ;        //C
i =0;            // D
printf("value of i in main %d\n",i);    // E
f1();                    // F
printf("value of i after call%d\n",i);    // G
}
void f1(void)                // H
{
int i=0;         //local variable for f1    // I
i = 50;                    // H
}
  
Share: 



Vilmos Fischer
Vilmos Fischer author of Example 4 of using function and local variables in functions is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!