Global Variables in C Programming

Source code for this Tutorial


#include <stdio.h>
#include <stdlib.h>

int a = 10, b = 20;

int main()
{
    display();
    printf("%d + %d is %d\n",a,b,(a+b));
    return 0;
}

void display(){
     a = 100;
     b = 200;
    printf("%d + %d is %d\n",a,b,(a+b));

}