C program to Reverse Print

How to write a C program to reverse print in C programing ?


Solution:
#include <stdio.h>

void print_reverse(char s[], int position);

int main()
{
print_reverse("Bangladesh", 0);

return 0;
}

void print_reverse(char s[], int position)
{
if(s[position] == '\0')
return;
print_reverse(s, position+1);
printf("%c", s[position]);
}


Learn More :