Q2-3-1

j20252119 · updated April 27, 2026
/*Q2-3-1*/
/*文字型データの取り扱い*/
#include <stdio.h>
int main() 
{
    char x,y,z;
    x='0';
    y=x+0x20;
    z=x+0x40;
    
    printf("%c \t %x \t %d \n",x,x,x);
    printf("%c \t %x \t %d \n",y,y,y);
    printf("%c \t %x \t %d \n",z,z,z);
    
    return 0;
}
Output

Comments

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