HTML


Pointers:
  • A pointer is a variable that stores/points the address of another value.
  • Pointers are used to allocate memory dynamically.
  • It might be belonging to any of the data type such as int, float, char, double.
  • Always c pointer is initialized to null. The value of the null pointer is zero.
  • & Symbol is used to get the address of the variable.
  • * Symbol is used to get the value of the variable that the pointer is pointing to.
Syntax: data_type *var_name;
Ex: int *p;
*denotes that p is a pointer variable.

Ex:


Output:


Recursion:

The process in which a function calls itself directly or indirectly is called recursion ad the corresponding function is called as recursive function.
Syntax:
 void recursion()
{
recursion();
}
int main()
{
recursion();
}
Ex: Finding sum of given number using Recursion

Output:

Ex: Finding sum of given number using Recursion

Output: