-- Forwarded message --
From: HARSH PAHUJA hpahuja.mn...@gmail.com
Date: Sun, Jul 3, 2011 at 8:37 AM
Subject: anu_test Segmentation fault
To: anutest...@googlegroups.com
http://www.ideone.com/QuMcn
plzz help.
y the above program is giving seg fault
#includestdio.h
1)
#includestdio.h
int main()
{
extern int a;
a=20;
printf(%d,sizeof(a));
return 0;
}
2)
#includestdio.h
int main()
{
extern int a;
printf(%d,sizeof(a));
return 0;
}
--
HARSHIT PAHUJA
M.N.N.I.T.
ALLAHABAD
--
You received this message because you are subscribed to the Google Groups
@piyush plz explain how are u getting this..
On Sat, Jul 2, 2011 at 12:10 PM, Piyush Sinha ecstasy.piy...@gmail.comwrote:
i) [Linker error] undefined reference to `a'
ii) 4
On 7/3/11, HARSH PAHUJA hpahuja.mn...@gmail.com wrote:
1)
#includestdio.h
int main()
{
extern int
will ny1 xplain this extern concept
y this is a linker error?
On Sat, Jul 2, 2011 at 12:49 PM, HARSH PAHUJA hpahuja.mn...@gmail.comwrote:
@piyush plz explain how are u getting this..
On Sat, Jul 2, 2011 at 12:10 PM, Piyush Sinha ecstasy.piy...@gmail.comwrote:
i) [Linker error
address
since def is not there so linker error.
case2. there will be noentry in the symbol table for a. as code doesnot
include any defintion related operation.
iF anything helps you, dont forget to say thanks
Thanks
Santosh
On Sun, Jul 3, 2011 at 1:38 AM, HARSH PAHUJA hpahuja.mn