code snippets(一):isxdigit(參數),判斷是否為十六進位字元。

#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

int main(int argc, char *argv[])
{
	//isxdigit(參數)
	//參數:是否為十六進位字元,條件成立,回傳非 0 值,否則回傳 0。
	//十六進位:0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
	if(isxdigit('g'))
	{
		printf("參數是十六進位字元\n");
	}
	else
	{
		printf("參數非十六進位字元\n");
	}
	return 0;
}
//Answer:參數非十六進位字元
arrow
arrow
    文章標籤
    int isxdigit(int c)
    全站熱搜

    mitblog 發表在 痞客邦 留言(0) 人氣()