局部和全局变量


局部和全局变量

#include <stdio.h>



/* global variable declaration */

int g = 20;



int main () {



  /* local variable declaration */

  int g = 10;



  printf ("value of g = %d\n",  g);



  return 0;

}