ft_isdigit

nawkim·2021년 5월 26일
0

libft

목록 보기
2/44

1.프로토타입

int	ft_isdigit(int c)
  • 헤더
#include <ctype.h>
  • 형태
int	isdigit(int c)

2. 용도

  • 숫자 문자('0' ~ '9')인지 판별.

3. 리턴값

  • 숫자 문자('0' ~ '9')라면 1, 아니면 0 반환.

4. 코드 구현

int	ft_isdigit(int c)
{
	if (c >= '0' && c <= '9')
		return (1);
	return (0);
}
profile
공부 기록.

0개의 댓글