#include <stdio.h>
#include <stdlib.h>
void main()
{
char a[50];
int n;
printf("enter the string : ");
gets(a);
n=strlen(a);
printf("%d",n);
for(i=n;i>0;i--)
{
printf("%c",a[i]);
}
}
the error is at i=n why cant we use i=n;