Demo entry 1777803

global

   

Submitted by anonymous on Jun 01, 2015 at 10:22
Language: C. Code size: 295 Bytes.

#include     <stdio.h>
int a; // グローバル変数
void tasu(void);
int main(void) {
    a = 1;
    printf("main()関数内から aの値 = %d\n", a);
    tasu();
    printf("main()関数内から aの値 = %d\n", a);
    tasu();
    return 0;
}
void tasu(void) {
    a=a+2;
    printf("tasu()関数内から aの値 = %d\n", a);
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).