What is Difference between recursive and non recursive function?

1 Answer

Answer :

A non-recursive function is simply an ordinary function. A recursive function only differs from an ordinary function in that it calls itself at some point.Recursive functions are often used to implement naturally recursive algorithms. For instance, the following example calculates the factorial of n (where n! = 1 * 2 * 3 * ... * n):unsigned f (unsigned n) {if (n

Related questions

Description : What is Difference between recursive and non recursive function?

Last Answer : A non-recursive function is simply an ordinary function. A recursive function only differs from an ordinary function in that it calls itself at some point.Recursive functions are often used to implement naturally recursive algorithms. For ... = 1 * 2 * 3 * ... * n):unsigned f (unsigned n) {if (n

Description : Write the recursive and non-recursive difference equations

Last Answer : The recursive system is described by the difference equation of the form N M =−� � y n b ( ) a y(n-k) + x(n-k) k k k k = = 1 0 The output at any instant depends upon the present and ... non-recursive system is described by the M =� y n b ( ) x(n-k) difference equation of the form k

Description : __________ do not take their decisions on measurements or estimates of the current traffic and topology. a. Static algorithms b. Adaptive algorithms c. Non - adaptive algorithms d. Recursive algorithms

Last Answer : c. Non - adaptive algorithms

Description : What is meant by recursive and non recursive system?

Last Answer : Prepared by Prof.S.Nagammai, HOD/EIE,KLNCE 243

Description : Which is the correct statement(s) for Non Recursive predictive parser? S1: First(α) = {t | α => * t β for some string β } => *tβ S2: Follow(X) = { a | S => * αXa β for some strings ... and S2 is correct. (C) S1 is correct and S2 is incorrect. (D) Both statements S1 and S2 are correct. 

Last Answer : (D) Both statements S1 and S2 are correct.

Description : What is meant by recursive function ?

Last Answer : Answer : When a function in C program automatically calls itself, that function is called recursive function and this process is called recursive. It is very difficult to understand recursive ... be easily solved by recursive functions. Each recursive function has to have a terminating condition.

Description : ............... is often used to prove the correctness of a recursive function. (A) Diagonalization (B) Communitivity (C) Mathematical Induction (D) Matrix Multiplication

Last Answer : (C) Mathematical Induction

Description : A recursive function h, is defined as follows: h(m)=k, if m=0  = 1, if m=1 = 2h(m-1) + 4h(m-2), if m≥2 If the value of h(4) is 88 then the value of k is: (1) 0 (2) 1 (3) 2 (4) -1

Last Answer : (3) 2 

Description : What is meant by recursive hints ?

Last Answer : Number of times processes repeatedly query the dictionary table is called recursive hints. It is due to the data dictionary cache is too small. By increasing the SHARED_POOL_SIZE parameter we can optimize the size of Data Dictionary Cache.

Description : The “Turing Machine” showed that you could use a/an _____ system to program any algorithmic task. a) binary b) electro-chemical c) recursive d) semantic

Last Answer : a) binary

Description : Which suggests the existence of an efficient recursive algorithm for online smoothing? a) Matrix b) Constant space c) Constant time d) None of the mentioned

Last Answer : b) Constant space

Description : The minimax algorithm computes the minimax decision from the current state. It uses a simple recursive computation of the minimax values of each successor state, directly implementing the defining equations. The ... are backed up through the tree as the recursion unwinds. a) True b) False

Last Answer : a) True

Description : Which search uses only the linear space for searching? a) Best-first search b) Recursive best-first search c) Depth-first search d) None of the mentioned

Last Answer : b) Recursive best-first search

Description : Convergense of the estimates is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Weighted voting of correction vectors is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Adaptive localization at multiple scales is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Weighted voting of correction vectors is a technique of A : Recursive filtering B : FilteringC : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Adaptive localization at multiple scales is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Classification of data points is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Convergense of the estimates is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Weighted voting of correction vectors is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Adaptive localization at multiple scales is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Classification of data points is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Convergense of the estimates is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Adaptive localization at multiple scales is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Weighted voting of correction vectors is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Convergense of the estimates is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Weighted voting of correction vectors is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Adaptive localization at multiple scales is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Classification of data points is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : Classification of data points is a technique of A : Recursive filtering B : Filtering C : Laandmark D : Pose estimation

Last Answer : A : Recursive filtering

Description : In a/an ………… of DNS resolver, the queried name server can return the best answer it currently has back to the DNS resolver. a. Recursive queries b. Iterative queries c. Reverse queries d. Inverse queries

Last Answer : b. Iterative queries

Description : The DNS server that received the initial ……... query checks it’s ………… is called…………... A. Recursive, zones B. simple, zones C. simple, class D. Recursive, class

Last Answer : A. Recursive, zones

Description : Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

Last Answer : Mergesort always makes recursive calls to sort subarrays that are about half size of the original array, resulting in O(n log n) time.

Description : Given the following statements: S1: Every context-sensitive language L is recursive. S2: There exists a recursive language that is not context sensitive. Which statement is correct? (A) S1 is not correct and S2 is ... (C) S1 is correct and S2 is not correct. (D) S1 is correct and S2 is correct.

Last Answer : (D) S1 is correct and S2 is correct. 

Description : Which of the following statements is false? (1) Every context-sensitive language is recursive. (2) The set of all languages that are not recursively enumerable is countable. (3) The family ... under union. (4) The families of recursively enumerable and recursive languages are closed under reversal.

Last Answer : The set of all languages that are not recursively enumerable is countable.