한국어
C/C++
 

HEX(16진수) to ASCII(아스키) 변환 코드

pjk 2014.08.24 16:25 조회 수 : 33613

#include "stdio.h"
char hex2ascii(char toconv)
{
	if (toconv<0x0A)    toconv += 0x30;
	else        toconv += 0x37; 
	return (toconv);
}


void main()
{
	char a=0;
	a=hex2ascii(0x01);
	printf("%h rn",a);
}
번호 제목 글쓴이 날짜 조회 수
공지 C Programming FAQs(한글번역 pdf문서) makersweb 2014.03.18 27014
2 C언어 강좌-배열과 포인터 file makersweb 2014.03.10 4729
1 C코드 최적화 pjk 2014.02.10 5481