[ create a new paste ] login | about

Link: http://codepad.org/KDP6vnjs    [ raw code | output | fork ]

C, pasted on Jun 12:
#include "stdio.h"

extern int a=5;

main(){

            void fun();

            printf("\n a=%d",a);

            fun();

            return 0;

            }

void fun()

{

            int a;

            printf(" in fun a=%d",a);

}


Output:
1
2

 a=5 in fun a=0


Create a new paste based on this one


Comments: