GATEverse
← GATE CSE 1999

Q10

MCQMarks unknown

Suppose we have a function HALTS which when applied to any arbitrary function ff and its arguments will say TRUE if function ff terminates for those arguments and FALSE otherwise. Example: Given the following function definition. FACTORIAL (N) = IF (N=0) THEN 1 ELSE N*FACTORIAL (N-1) Then HALTS (FACTORIAL, 4) = TRUE and HALTS (FACTORIAL, -5) = FALSE Let us define the function FUNNY (f) = IF HALTS (f) THEN not (f) ELSE TRUE

Sign in to save attempts.

Loading…