20选择5填空
-
选择1 猴子摘桃子,每天都吃一半多一个,五天后剩1个 问一开始多少个
46 -
选择2 进程P的若干线程不能共享的是
栈指针 -
选择3 11台打印机,N个进程,每个进程占3个,大于等于多少个会死锁
(3-1)N>11 N=6 -
选择4和9都是这个 32位操作系统,内存64MB,硬盘500MB,虚拟空间地址多少字节?
我一个选的4gb,一个选的64 对一个。。 -
选择5 二分复杂度n错 快排、堆都不稳定对 前后可以确定唯一中序错 递归转非递归用队列错
这题选错成C了 -
选择6 、8 、10、11 都是C语言指针 乱选的
-
选择7 LRU是啥?
最近最少使用 -
选择12 QQQWWWEERRRR的非空字串多少个
我算的65 -
选择13 甲三个球123 乙三个球456 随便取一个大于6概率
我算的2/3 -
选择14 公钥密码体制里不公开的是
私钥 -
选择15 2、1、2/3、1/2找规律
2/5 -
选择16 很简单的判断布尔值 A
-
选择17 10、5、25、35、_、155找规律
85 -
选择18 1000个无序数字找50个最大的数
堆排序 -
选择19 C源代码可执行过程
预处理-编译-汇编-链接 蒙对了。。 -
选择20 忘了。。
填空全是C语言我醉了
最后一道题 翻转字符串,但是要保证单词顺序不变,比如Aaa Bbb变成Bbb Aaa
void reverse(char *sentence,int start,int end){
if(seqence==NULL||start<0||start>end){
return;
}
while(start<end){//填空1
char* temp=sentence[start];
sentence[start]=sentence[end];//填空2
sentence[end]=tem;
start++;
end--;
}
}
void reverse_sentence(char *sentence,int len){
if(sentence==NULL||len<1)
return;
reverse(sentence,0,len-1);//填空3
int start=0,end=0;
while(start<len){
if(sentence[start]==' '){
start++;
end--;
}else if(end<len-1&&sentence[end+1]==' ')//填空4{
reverse(sentence,start,end);//填空5
start=end;
end++;
}else{
end++;
}
}
return;
}