Skip to content

Instantly share code, notes, and snippets.

@tera-ny
Created May 18, 2021 02:50
Show Gist options
  • Save tera-ny/94cfa59260da932e2996d4d7bd42d9a1 to your computer and use it in GitHub Desktop.
Save tera-ny/94cfa59260da932e2996d4d7bd42d9a1 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int my_strlen(char* s) {
int count = 0;
while (s[count] != '\0')
{
count++;
}
return count;
}
int main() {
printf("%d\n",my_strlen("hogehoge"));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment