What should be keep precautions while using the recursion
method?



What should be keep precautions while using the recursion method?..

Answer / harshal shah

Ans: 1)There should not be any uninitialized pointer.
2)Always allocated memory should be deallocate at
the end of recusion function or object.
3)Alwas declare one End point condition.

Is This Answer Correct ?    12 Yes 0 No

Post New Answer

More C Interview Questions

Explain how can I remove the trailing spaces from a string?

0 Answers  


Differentiate between static and dynamic modeling.

0 Answers   Wipro,


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

0 Answers  


What are the benefits of c language?

0 Answers  


i=20,k=0; for(j=1;j<i;j=1+4*(i/j)) { k+=j<10?4:3; } printf("%d", k);

8 Answers   HCL,






main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs?

9 Answers   BTBP, CitiGroup,


How to print "Hi World" without using semi colon?

6 Answers   Infosys,


What are multibyte characters?

0 Answers  


Why isn't it being handled properly?

0 Answers  


What is the right type to use for boolean values in c? Is there a standard type?

0 Answers  


Go through this linked list concept.While traversing through the singly linked list sometimes the following code snippet "while(head != NULL)" is used and other times "while(head->link != NULL)"is used(Here head is the pointer pointing to the first node,node has two parts data part and link part).What is the difference between head != NULL and Head->link != NULL and in which situation are they used?

1 Answers   Oracle,


pointer_variable=(typecasting datatype*)malloc(sizeof(datatype)); This is the syntax for malloc?Please explain this,how it work with an example?

2 Answers   eClerx, Excel, kenexa,


Categories