2-6

j20252119 · updated April 27, 2026
/*E2-6*/
/*文字型データの取り扱い*/
#include <stdio.h>
int main() 
{
    char p,q,r;
    p='9';
    q='M';
    r='m';
    
    printf("%c \t %d(10) \t %x(16) \n",p,p,p);
    printf("%c \t %d(10) \t %x(16) \n",q,q,q);
    printf("%c \t %d(10) \t %x(16) \n",r,r,r);
    
    return 0;
}
Output

Comments

Please sign up or log in to contribute to the discussion.