Write the prototype function in C: char * my_strchr (char * arr, char c);
The function should return the cursor to the first occurrence of the forwarded character in the character sequence or NULL if the forwarded character was not found.
i came up with solution also but it has to be string :
char *my_strchr(char *arr,char c)
{
int i=0;
char *p;
while(1)
{
if(i[arr] == c){p = i[arr];return p;break;}
if(i[arr] == '\0'){p= NULL;return p;break;}
i++;
}}