橘子味的心
标题:全局变量

全局变量

#include <stdio.h>



/* global variable declaration */

int g;



int main () {



  /* local variable declaration */

  int a, b;



  /* actual initialization */

  a = 10;

  b = 20;

  g = a + b;



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



  return 0;

}

目录

分类