C How To Use Extern Variable Code Example


Example: what is the usage of extern in c

#include <stdio.h> extern int x = 32; int b = 8; int main() {    auto int a = 28;    extern int b;    printf("The value of auto variable : %d\n", a);    printf("The value of extern variables x and b : %d,%d\n",x,b);    x = 15;    printf("The value of modified extern variable x : %d\n",x);    return 0; }

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable