1.

How many types of self-referential recursive data are there in computer programs?(a) 6(b) 2(c) 10(d) 4I had been asked this question in semester exam.This intriguing question originated from Recursion in division Induction and Recursion of Discrete Mathematics

Answer»

Right CHOICE is (b) 2

Explanation: There are TWO types of self-referential definitions and these are inductive and coinductive definitions. An inductively defined recursive data definition MUST have to SPECIFY how to CONSTRUCT instances of the data. For example, linked lists are defined as an inductively recursive data definition.



Discussion

No Comment Found

Related InterviewSolutions