单项选择题

交换两个变量的值,不允许用临时变量,应该使用下列______位运算符。

A.&
B.^
C.||
D.~
<上一题 目录 下一题>
热门 试题

单项选择题
若有以下程序#include<stdio.h>#include<stdlib.h>#include<string.h>typedef struct stu{char*name,gender;int score;}STU;void f(char*p){p=(char*)malloc(10);strcpy(p, Qian );}main(){STU a={NULL, m ,290},b;a.name=(char*)malloc(10);strcpy(a.name, Zhao );b=a;f(b.name);b.gender= f ;b.score=350;printf( %s,%c,%d, ,a.name,a.gender,a.score);printf( %s,%c,%d n ,b.name,b.gender,b.score);}则程序的输出结果是______。
A.Zhao,m,290,Zhao,f,350
B.Zhao,m,290,Qian,f,350
C.Qian,f,350,Qian,f,350
D.Qian,m,290,Qian,f,350
单项选择题
有以下程序#include<stdio.h>int add(int a,int b){return(a+h);}main(){ int k,(*f)(),a=5,b=10;f=add;}则以下函数调用语句错误的是______。
A.k=*f(a,b);
B.k=add(a,b);
C.k=(*f)(a,b);
D.k=f(a,b);
相关试题
  • 以下叙述中错误的是______。
  • 设有定义double a[10], *s=a;以...
  • 以下叙述中正确的是______。
  • 以下程序中函数sort的功能是对a数组中的数...