explain ackerman's recursion. how long it takes to execute the following code for an average PC
The Ackermann–Péter function works as advertised, while not being primitive recursive. There is an abundance of literature on this function and its execution time. Growth in the second parameter depends on the first, it is a bit like going from counting to addition to multiplication to exponentiation ...
The execution time of the code shown is entirely irrelevant, as the values will almost immediately overflow anyways - googol is small compared to ack(4,2), googolplex dwarfed by ack(5, 1).