Recursive functions and storage classes
Gapfill exercise
Enter your answers in the gaps. When you have entered all the answers, click on the "Check" button.
What do you mean by recursive function in C?
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
is the process which comes into existence when a function calls a
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
of itself to work on a
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
problem. Any function which calls itself is called recursive function, and such function calls are called recursive
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
. Recursion involves several numbers of recursive calls. However, it is important to impose a termination condition of recursion. Recursion code is shorter than
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
code however it is
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
to understand.
Recursion
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
be applied to all the problem, but it is more useful for the tasks that can be defined in terms of similar
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
. For Example, recursion may be applied to sorting,
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
, and traversal
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
.
What is memory allocation of recursive method?
Each recursive call creates a new
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
of that method in the memory. Once some data is
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
by the method, the copy is
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
from the memory. Since all the
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
and other stuff declared inside function get stored in the
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
, therefore a separate stack is maintained at each
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
call. Once the value is returned from the corresponding function, the stack gets
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
. Recursion involves so much complexity in resolving and
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
the values at each recursive call. Therefore we need to maintain the
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
and track the values of the variables defined in the
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
.
What is garbage value C?
Allocating a variable implies
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
some memory for that
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
. In some programming languages (like C) if a
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
is allocated but
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
assigned, it is said to have a "
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
value" , that is, some
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
that was being held any
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
piece of the computer's
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
.
What is storage classes in C?
A
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
class defines the
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
(visibility) and life-time of
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
and/or functions within a C Program
How many storage classes are there?
Storage
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
in C are used to determine the lifetime, visibility,
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
location, and
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
value of a variable. There are
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
types of storage classes in C
Automatic
External
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
Register
Which storage class is faster?
For faster access of a
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
, it is better to go for register
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
rather than auto specifiers. Because,
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
variables are stored in register memory whereas auto
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
are stored in main
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
memory. Only few variables can be
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
in register
calls
cannot
classes
copy
CPU
destroyed
difficult
four
garbage
information
initial
iterative
memory
not
problems
random
Recursion
recursive
register
removed
reserving
returned
scope
searching
smaller
specifiers
stack
Static
storage
stored
subtasks
tracking
variable
variables
.
Check
OK