when i compile the code i get this error
strlen.c:4:5: error: conflicting types for ‘strlen’
strlen.c:13:5: error: conflicting types for ‘strlen’
/////////////////////////////////////////////////////////////////
this my code
/////////////////////////////////////////////////////////////////
Code:
#include <stdio.h>
#include <string.h>
int strlen(char *);
int main()
{
strlen("rukshan");
printf("%d\n",strlen("rukshan"));
}
/* strlen: return length of string s */
int strlen(char *s)
{
int n;
for (n = 0; *s != '\0';s++)
n++;
return n;
}
plz help meeeee............
thank you