global variables on c code example
Example 1: How to define global variables
Use pm.globals to define a global variable:
pm.globals.set("variable_key", "variable_value");
Example 2: variable globlal c
#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;
}