Bus Error (core dumped) due to SIGBUS signal
Hi,
Please note the behaviour of this program. I know that SIGBUS comes because of address mis-alignments in read/write acesses.
could anybody please explain the behaviour of the following program:
void main()
{
short a;
scanf("%d",&a);
printf("\n a= ",a);
}
case one:
chattan:~/junk]$ a.out
2 //input given
Bus Error (core dumped)
chattan:~/junk]$
case two:
chattan:~/junk]$ a.out
a //input given
a=
chattan:~/junk]$
|