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]$ |
You would probably have better luck with this on the Programming board.
|
All times are GMT -5. The time now is 02:25 PM. |