what are the advantage and disadvantage of recursion
Answer Posted / vadivelt
Recursion will be useful when same kind of job has to be
continued for a finite no input or time.
Eg: calculating series, finding factorial etc..
Disadvantage would be,
1.Hard to analyse or understand the code.
2.If the recursive function is called for infinite no of
times and memory constrains are not taken care, then stack
overflow may occur So system may crash.
| Is This Answer Correct ? | 52 Yes | 7 No |
Post New Answer View All Answers
What is the time and space complexities of merge sort and when is it preferred over quick sort?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
What do you mean by command line argument?
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
Explain how do you determine the length of a string value that was stored in a variable?
What is a const pointer?
What is nested structure with example?
Is using exit() the same as using return?
What is quick sort in c?
Explain how can I read and write comma-delimited text?
Why c is called object oriented language?
What are directives in c?
Define Spanning-Tree Protocol (STP)
Differentiate between the expression “++a” and “a++”?
what type of questions arrive in interview over c programming?