#include<stdio.h>
void reverse(char s[], int i);
main()
{
int i,c;
char s[1000];
for(i=0;(c=getchar())!='\n';i++)
{
s[i]=c;
c=getchar();
}
void reverse(s,i); [B] //getting error in this line[/B]
return 0;
}
void reverse(char input[], int n)
{
int i;
for(i=n;i>=0;--i)
{
printf("%c", input[i]);
}
}
i am writing a program to reverse the input string, with the help of a function "reverse". However, my program doesn't compile. Pls tell me the cause of the error , as i have tried a lot to spot it but fails. I'm new to programming.