2019-11-14 23:54:30
#include <stdio.h>left(unsigned value,int n){ unsigned z; z=(value>>(32-n))|(value<<n); return z;}void main(){ unsigned a; int n; printf("please input a number:\n"); scanf("%o",&a); printf("please input
2019-11-14 23:02:09
#include <stdio.h>void main(){ int x=30,y=-30; x=x>>3; y=y>>3; printf("the result1 is:%d,%d\n",x,y); x=x>>2; y=y>>2; printf("the result2 is:%d,%d\n",x,y);}
2019-11-14 22:57:36
#include <stdio.h>void main(){ int x=15; x=x<<2; printf("the result is:%d\n",x); x=x<<3; printf("the result is:%d\n",x);}
2019-11-14 22:53:32
#include <stdio.h>int main(){ unsigned result; int a,b; printf("please input a:"); scanf("%d",&a); printf("please input b:"); scanf("%d",&b); printf("a=%d,b=%d",a,b); result=a^b; printf(
2019-11-14 22:48:12
#include <stdio.h>int main(){ unsigned result; int a; printf("please input a:"); scanf("%d",&a); printf("a=%d",a); result=~a; printf("\n~a=%o\n",result); return 0;}
2019-11-14 22:27:12
#include <stdio.h>int main(){ int a=0XEFCA ,result; result=a|a; printf("a|a=%X\n",result); return 0;}
2019-11-13 22:05:11
#include <stdio.h>void main(){ unsigned result; int age1,age2; printf("please input age1:"); scanf("%d",&age1); printf("please input age2:"); scanf("%d",&age2); printf("age1=%d,age2=%d",
2019-11-13 21:32:46
#include <stdio.h>enum Color{Red=1,Blue,Green} color;int main(){ int icolor; printf("请输入你喜欢的颜色编号:\n"); scanf("%d",&icolor); switch(icolor){ case Red: printf("the choice is Red\n"); break; case Blue: printf(&
2019-11-13 21:18:51
共用体变量中起作用的永远是最后一个放入的成员,不能对共用体变量赋值,也不能引用变量名得到一个值#include <stdio.h>#include <string.h>struct sea{ char name[64];};union season{ struct sea p;};int main(){ union season s; strcpy(s.p.name,"夏季"); printf("现在是:%s\n&q
2019-11-13 21:05:46
#include <stdio.h>#include <string.h>struct peaches{ char name[64];};struct coconut{ char name[64];};struct hawthorn{ char name[64];};union tin{ struct peaches p; struct coconut c; struct hawthorn h;};int main(){ union tin t; strcpy(t.p.