http://www.hackerschool.org/HS_Boards/zboard.php?id=QNA_programming&no=2040 [º¹»ç]
#include <stdio.h>
int main( void )
{
char ch[100];
int i;
printf( "input please : " );
scanf( "%s" , ch );
for(i=0;ch[i]!='\0';i++)
printf( "ASCII change is : %d\n" ,ch[i]);
}
===============================================================================
>- source.c -
>
>#include <stdio.h>
>#include <unistd.h>
>
>int main( void )
>{
> char ch;
>
> printf( "input please : " );
> scanf( "%c" , &ch );
>
> printf( "ASCII change is : %d\n" , ch );
>}
>
>- end of file -
>
>´Ü¾î°íÄ¡¼¼¿ä~ : ¹®ÀÚ¿ -> ¹®ÀÚ
>
>ÀÌ°Ô ÇÁ·Î±×·¥ÀÔ´Ï´Ù.
>
>ÁöÁ¤µÈ ¹®ÀÚ¸¦ ¾Æ½ºÅ° Áï, Àú±â¼ º¸¸é Á¤¼ö·Î Ãâ·ÂÇϴ°Ͱú °°½À´Ï´Ù.
>
>- use -
>
>[hkpco@ftz hkpco]$ ./ascii
>input please : c
>ASCII change is : 99
>[hkpco@ftz hkpco]$
>
>- end -
>
>ÀÌ·¸°Ô »ç¿ëÇÕ´Ï´Ù.
>
>ºÐ¼®µµ Çغ¸½Ã±¸¿ä...
>
>¼ö°íÇϼ¼¿ä ^^;
=============================================================================== |
Hit : 3310 Date : 2009/05/26 05:58
|