Multiple declarations and definations

Posted by Yogesh on Stack Overflow See other posts from Stack Overflow or by Yogesh
Published on 2010-05-26T09:55:39Z Indexed on 2010/05/26 10:01 UTC
Read the original article Hit count: 163

Filed under:
X.c >>
-------------------------
int i;
main ()
{
fun ();
}
-------------------------
Y.c >>

int i;
fun ()
{

}

why does these two files compile with no error ? (using GCC)

but if i use int i = 10; throws multiple definition error

© Stack Overflow or respective owner

Related posts about c