网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

将整型数按位取

时间:2024-10-13 15:41:09

1、写代码#include<stdio.h>#include<stdlib.h>type颊俄岿髭def struct bitflow{ unsigned int bit0:1; unsigned int bit1:1; unsigned int bit2:1; unsigned int bit3:1; unsigned int bit4:1; unsigned int bit5:1; unsigned int bit6:1; unsigned int bit7:1;}Bitflow;void main(){ unsigned int c; int d; int e; Bitflow b; scanf("%d",&c); b.bit7=(c&128)>>7; printf("%d\n",(c&128)>>7); b.bit6=(c&64)>>6; printf("%d\n",(c&64)>>6);"bitoutput.c" 37L, 692C

将整型数按位取

2、编译

将整型数按位取
© 2025 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com