int strloc(char* str, char c)
{
int pos=0;
while (str[pos] && str[pos] != c) {
pos++;
}
if (str[pos])
return pos;
else
return -1;
}
int strloc(char* str1, char* str2)
{
int pos = 0;
char* str3 = str2;
while (str1[pos]) {
if (str1[pos++] != *str3++)
str3 = str2;
if (*str3 == '\0')
return pos-strlen(str2);
}
return -1;
}
{
int pos=0;
while (str[pos] && str[pos] != c) {
pos++;
}
if (str[pos])
return pos;
else
return -1;
}
int strloc(char* str1, char* str2)
{
int pos = 0;
char* str3 = str2;
while (str1[pos]) {
if (str1[pos++] != *str3++)
str3 = str2;
if (*str3 == '\0')
return pos-strlen(str2);
}
return -1;
}