Reset Arduino programmatically

This code resets Arduino – in-line – in program, whenever called. Ugly, but works.


// definition
void(* resetFunc) (void) = 0; //declare reset function @ address 0

Source: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1288779911/3#3