---
title: "Normal vs recursive function"
subject: "Data Structure and Algorithm"
chapter: 5
key: "semester_4/data_structure_and_algorithm:normal-vs-recursive-function"
source: https://www.bctengineer.com/q/semester_4/data_structure_and_algorithm/normal-vs-recursive-function
site: BCT Engineering
---

# Normal vs recursive function

Data Structure and Algorithm · Chapter 5: Recursion

- Asked in: 2075 Baisakh, 3 marks
- Video: [Recursion in C](https://www.youtube.com/watch?v=kepBmgvWNDw) — Neso Academy
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/data_structure_and_algorithm/normal-vs-recursive-function
- Whole chapter: https://www.bctengineer.com/md/semester_4/data_structure_and_algorithm/chapter-5

## Question

Distinguish between normal function and recursive function.

## Short answer

A normal function is called by others and uses loops for repetition, while a recursive function calls itself, requires a base case, and uses the call stack for repetition. Recursion may be slower and use more memory but simplifies code for problems like tree traversal.

## Answer

| Basis | Normal (non-recursive) function | Recursive function |
|---|---|---|
| Calling | Called by other functions, never by itself | Calls itself (directly or indirectly) |
| Termination | Ends after its statements run | Needs a base case, else infinite recursion |
| Repetition | Uses loops (for, while) | Repetition by repeated self-calls |
| Memory | One stack frame per call | Many frames at once; stack overflow possible |
| Speed | Usually faster | Usually slower (call overhead) |
| Code | Can be longer for some problems | Short and clear for tree, TOH, factorial type problems |
| Example | `sum = a + b;` | `fact(n) = n * fact(n-1)` |

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How does a recursive function differ from a normal function in calling?
   A. It is called only once
   B. It can never take parameters
   C. It must be called from main only
   D. It calls itself directly or indirectly
   Answer: D. Self-calling defines a recursive function. (Key point: Calling)

2. What does a recursive function need to terminate?
   A. A base case
   B. A for loop
   C. A global variable
   D. A pointer argument
   Answer: A. Without a base case the recursion is infinite. (Key point: Termination)

3. Compared with a normal function, a recursive function is usually
   A. faster and uses less memory
   B. slower and uses more stack, with risk of stack overflow
   C. faster but with stack overflow
   D. same speed and memory
   Answer: B. Many frames exist at once and each call has overhead. (Key point: Memory and speed)

## Related in Data Structure and Algorithm

- [Is recursion slow; recursive vs non-recursive](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Arecursion-slow-compare) — Data Structure and Algorithm, chapter 5
- [Recursion; iterative vs recursive choice](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Adefine-recursion-iterative-vs-recursive) — Data Structure and Algorithm, chapter 5

## Related in other subjects

- [Recursive function and how it works](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Arecursive-function-explain) — Computer Programming, chapter 6, asked 3×
- [Rolled vs normal concrete; CC pavement construction](https://www.bctengineer.com/question.md?key=semester_7%2Ftransportation_engineering_ii%3Arolled-concrete-cc-pavement-construction) — Transportation Engineering II, chapter 3
- [Standard normal: definition, properties, importance](https://www.bctengineer.com/question.md?key=semester_5%2Fprobability_and_statistics%3Astandard-normal-definition-properties-importance) — Probability and Statistics, chapter 3, asked 2×
- [Marconi transmitter, mobile vs nomadic, Telecom Act](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Amarconi-mobile-nomadic-act) — Telecommunications, chapter 1
