The following code shows Recursive and Non-Recursive Functions to Show a Sequence in C.

//Examples of recursive and non-recursive functions in C

#include <stdio.h>
void showsequence_recursive(int n)
{
    if(n==0)
    {
        
        return;
    }
    else
    {
        printf("%d ", (n--)*4);
        showsequence_recursive(n);
    }
}
void showsequence_non_recursive(int n)
{
    while(n!=0)
    {
        printf("%d ", n*4);
        n--;
    }
}
int main()
{
    int n, f, sum, a, b, power;
    printf("Enter a number : ");
    scanf("%d", &n);
    printf("\nSequence using recursive function....\n");
    showsequence_recursive(n);
    printf("\nSequence using non-recursive function....\n");
    showsequence_non_recursive(n);
    return 0;
}

Output

Recursive and Non-Recursive Functions to Show a Sequence
Recursive and Non-Recursive Functions to Show a Sequence

Further Reading

50+ C Programming Interview Questions and Answers

C Program to Find Factorial of a Number