LuvSea

strlen 구현 본문

sTudy

strlen 구현

사랑海 2009. 7. 10. 10:34
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

// 문자열의 길이를 return

int
 strlen2(char *s1)
{
  int cnt = 0;

  while(*s1 != '\0';)
  {
    cnt++;
    s1++;
  }
  return cnt;
}

'sTudy' 카테고리의 다른 글

strrev 구현  (0) 2009.07.10
strcmp 구현  (0) 2009.07.10
strcat 구현  (0) 2009.07.10
strcpy 구현  (0) 2009.07.10
Brush, Pen 응용  (0) 2009.07.06
Comments