1.

Which among the following is the only conditional branching structure suitable for primitive recursion?(a) For loop(b) While loop(c) Do while loop(d) Go-to statementI had been asked this question in a job interview.I'm obligated to ask this question of Computational Processing Resources in chapter Software Defined Radio Architecture of Cognitive Radio

Answer»

Right choice is (a) For loop

Explanation: A PRIMITIVE recursive FUNCTION is one in which the upper bound or the number of iterations to be performed is known. CONSIDER for a loop from i = 1 to N, N is fixed before ENTRY into the loop and cannot be change within the loop. The for loop is the only structure that SATISFIES primitive recursive function.



Discussion

No Comment Found

Related InterviewSolutions