运算符
程序中的运算符远不仅仅是数学中的加减乘除等运算符,包括多个大类,如逻辑运算符、关系运算符、自增自减运算符、算数运算符、位运算符等等,也有像条件运算符、sizeof运算符、赋值运算符、取地址运算符等,非常多,运算符和变量、常量的结合就是表达式,这里聚合大量运算符相关的题目和教程,供大家学习
-
下列运算符不能重载为友元函数的是
-
有如下程序:#include main() { int i, array[5]={3,5,10,4}; for(i=0;i<5;i++)printf("%d,",array[i]&3); printf("\n"); }程序运行后的输出结果是( )。
-
有以下程序:#include <stdio.h> main( ) { int i, array[6] = {1, 5, 0, 4}; for (i=0; i<5; i++) printf("%d,", array[i] & 4); printf("\n"); }程序运行后的输出结果是( )。
-
有以下程序:#include <stdio.h> main() { char c='A'; int x=36,b; b=(x>>2)&&(c<'a'); printf("%d\n",b); }程序运行后的输出结果是( )。
-
有以下程序:#include <stdio.h> main() { int c,d; c=(13>>1)|1; d=(13>1)||1; printf("%d,%d\n",c,d); }程序运行后的输出结果是( )。
-
有如下程序:#include <stdio.h> main() { int a=9,b; b=(a>>3)%4; printf("%d,%d\n",a,b); }程序运行后的输出结果是( )。
-
有如下程序:#include <stdio.h> main() { int a=8,b; b=(a>>2)%2; printf("%d,%d\n",a,b); }程序运行后的输出结果是( )。
-
若变量已正确定义,则以下语句的输出结果是( )。s=32; s^=32; printf(″%d″,s);
-
有以下程序#include <stdio.h> main() { int i=1; i=i^i; printf("%d\n",i); }程序运行后的输出结果是( )。
-
有以下程序#include <stdio.h> main() { unsigned char a=2,b=4,c=5,d; d=a|b; d&=c; printf("%d\n",d); }程序运行后的输出结果是( )。
-
设有以下语句int a=1,b=2,c; c=a^(b<<2);执行后,c的值为( )。
-
有以下程序:#include <stdio.h> main() { char a=4; printf("%d\n",a=a<<1); }程序运行的结果是( )。
-
有以下程序:#include <stdio.h> main() { int a=5,b=1,t; t=(a<<2)|b; printf("%d\n",t); }程序运行后的输出结果是( )。
-
若有以下程序段:int r=8; printf("%d\n",r>>1);输出结果是( )。
-
有以下程序:#include <stdio.h> main() { int c,d; c=10^3; d=10+3; printf("%d,%d\n",c,d);}程序运行后的输出结果是( )。
-
有以下程序#include <stdio.h> main() { int a=1,b=2,c=3,x; x=(a^b)&c; printf("%d\n",x); }程序的运行结果是( )。
-
有以下程序:#include <stdio.h> main() { int a=2,b=2,c=2; printf("%d\n",a/b&c); }程序运行后的结果是( )。
-
有以下程序:#include <stdio.h> main(){ short c=124; c=c______; printf("%d\n",c); }若要使程序的运行结果为248,应在下画线处填入的是( )。
-
有以下程序#include <stdio.h> void main() { unsigned char a=8, c; c = a>>3; printf("%d\n",c); }程序运行后的输出结果是( )。
-
有以下程序:#include <stdio.h> main() { int a=2,b; b=a<<2; printf("%d\n",b); }程序运行后的输出结果是( )。