You convert your input to a double
, but the alarm() functions expects an unsigned int
. No idea what the bit pattern of the lower (upper) half of a 1.0 is, but I would not be surprised if it comes out as 14.
Does the compiler not complain about passing the double arg3
into alarm()
?