码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
fputs与read
read(fd, buf, number)从fd中申请读取number个字符,返回实际读取的数,若达到文件末,则返回0.若文件中有30个字符,number设置100第一次:read返回30第二次:read返回0故一般读取文件形式:while((n = read(fd,buf,number)) >0)...
分类:其他好文   时间:2014-06-29 14:07:29    阅读次数:243
c语言中的break 和 continue语句
break break如果用于循环适用于终止循环 break如果用于switch,则是用来终止switch break不能直接用于if,除非if属于循环内部的一个子句 如 if (表达式) break 是错误的 1 # include 2 3 int main (void) 4 { 5 i...
分类:编程语言   时间:2014-06-07 03:54:36    阅读次数:268
20140527 希尔排序
#includevoid ShellSort(int *a,int length){ int jump=length; int temp=0; int change=1; while(jump>0) //while1 { jump=jump/2; change=1; /***************...
分类:其他好文   时间:2014-06-07 03:53:30    阅读次数:243
Sqrt(x)
Implementint sqrt(int x).Compute and return the square root ofx.classSolution{public:intsqrt(intx){inti=0;intstep=1;while(step>0){while((i+step)>1);}r...
分类:其他好文   时间:2014-06-04 19:54:17    阅读次数:214
CPU与IRP的一些相关函数
VOIDKiAdjustIrpCredits ( VOID )其中 Number = KeNumberProcessors;Prcb = KiProcessorBlock[Index];多核情况下调整每个CPU的IRP对象配额。在while (Index Lookaside...
分类:其他好文   时间:2014-06-03 11:35:52    阅读次数:254
Return 和 Break 的区别
前段日子发布的负面情绪太多了,哦哦,其实我需要的是努力,努力提高自己的真实能力。经历了好多的鄙视否定,我已经没有最初那么敏感,心态平和了许多。我没有借口说基础不好了,一年了,要努力的话,那么我应该不会落后太远,可我努力了吗?好像大部分回忆都是在加班加点的费劲的完成任务,而自己的编程知识确实无暇...
分类:其他好文   时间:2014-05-30 16:59:53    阅读次数:255
Random 产生一个int数组,长度为100,并向其中随机插入1-100,并且不能重复。
做法1: List list = new List(); Random rand = new Random(); while (list.Count =1,=0,<100 之间的随机数m、n,颠倒arr[m]和arr[n]的数。 int[] arr = new int[100]; //把100个数顺...
分类:其他好文   时间:2014-05-30 04:27:12    阅读次数:208
解决SQL Server管理器无法连接远程数据库Error: 1326错误
解决SQL Server管理器无法连接远程数据库Error: 1326错误我们在在使用SQL Server时都会遇到使用SQL Server Management Studio无法连接远程数据库实例的问题,错误描述信息摘录如下:An error has occurred while establis...
分类:数据库   时间:2014-05-29 20:50:49    阅读次数:404
解决VNC中tab键无效的方法
http://ubuntuforums.org/archive/index.php/t-1771058.htmlI accidentally discovered a fix for this while trying to solve a different problem.edit~/.conf...
分类:其他好文   时间:2014-05-29 15:00:26    阅读次数:623
常用dos命令
ASSOC 显示或修改文件扩展名关联。AT 计划在计算机上运行的命令和程序。ATTRIB 显示或更改文件属性。BREAK 设置或清除扩展式 CTRL+C 检查。CACLS 显示或修改文件的访问控制列表(ACLs)。CALL 从另一个批处理程序调用这一个。CD 显示当前目录的名称或将其更改。CHCP ...
分类:其他好文   时间:2014-05-29 10:37:59    阅读次数:317
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!