while(1) {while (((in+1)%BUFFER-SIZE) ==out) buffer[in]=nextproduced;in=(in+1)%BUFFER-SIZE;}

while(1) {while (((in+1)%BUFFER-SIZE) ==out) buffer[in]=nextproduced;in=(in+1)%BUFFER-SIZE;}

题目
while(1) {while (((in+1)%BUFFER-SIZE) ==out) buffer[in]=nextproduced;in=(in+1)%BUFFER-SIZE;}
这种方法最多允许缓冲的最大项数为BUFFER-SIZE-1,能否修改代码,使得将其缓冲的最大项数改为BUFFER-SIZE,即全部填满.请详细回答.
答案
while(1) {
while ((in%(BUFFER-SIZE)) ==out)
buffer[in]=nextproduced;
in=in%(BUFFER-SIZE);
}
试试.
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
最新试题
热门考点

超级试练试题库

© 2017-2019 超级试练试题库,All Rights Reserved.