Skip to content

Commit

Permalink
strlen 함수 구현
Browse files Browse the repository at this point in the history
strlen 함수 구현
  • Loading branch information
hyejun0608 authored Jun 17, 2020
1 parent e2e3df8 commit 7177a5f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions strlen 구현.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <stdio.h>

int strlen(char* dest) {
int i;
for (i = 0; dest[i]; i++);
return i;
}

int main()
{
char dest[100];
scanf("%s", dest);
printf("%d", strlen(dest));
return 0;
}

0 comments on commit 7177a5f

Please sign in to comment.