#include <stdio.h>
#define FALSE 0
#define TRUE !FALSE
int main(){
int value,c, count;
char line[128];
count = 0;
while(TRUE){
count++;
if(count > 5) break;
printf("Enter a HexValue ===> "); fgets(line, sizeof(line), stdin); sscanf(line, "%x", &c); printf("Colum=%02d:%%d(%3d)-%%x(%2x)",count,c,c); if(0x20 <= c && c <= 0x7e) printf("-%%c(%c)\n",c); else printf("-Not Printable character\n"); if (0x20 <= c && c <= 0x2f){ puts("====> Scope_A\n"); }else if(0x30 <= c && c <= 0x39){ puts("====> Scope_B\n"); }else if(0x3a <= c && c <= 0x40){ puts("====> Scope_C\n"); }else if(0x41 <= c && c <= 0x5a){ puts("====> Scope_D\n"); }else{ puts("====> Scope_E\n"); }
}
return(0);
}
/*
Enter a HexValue ===> 56
Colum=01:%d( 86)-%x(56)-%c(V)
====> Scope_D
Enter a HexValue ===> 07
Colum=02:%d( 7)-%x( 7)-Not Printable character
====> Scope_E
Enter a HexValue ===> ff
Colum=03:%d(255)-%x(ff)-Not Printable character
====> Scope_E
Enter a HexValue ===> 7f
Colum=04:%d(127)-%x(7f)-Not Printable character
====> Scope_E
Enter a HexValue ===> 7e
Colum=05:%d(126)-%x(7e)-%c(~)
====> Scope_E
*/
このプログラミングがどういう意味なのかわかりません。
今年から大学に進学してプログラミングを学んでいるのですが、初心者すぎて授業についていけていません。
printf("Enter a HexValue ===> ");
fgets(line, sizeof(line), stdin);
sscanf(line, "%x", &c);
printf("Colum=%02d:%%d(%3d)-%%x(%2x)",count,c,c); if(0x20 <= c && c <= 0x7e) printf("-%%c(%c)\n",c); else printf("-Not Printable character\n");
特にこの部分について教えてほしいです。
どうかよろしくお願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。