发布时间:2013-10-22 19:36:22
//整形数组,有正数,有负数,有0,求连续子序列最大和;//int a[]={-5,0,9,8,7,6,5,45,-100,9,0,56,45};#include<stdio.h>int main(void){ int a[]={-5,0,9,8,7,6,5,45,-100,9,0,56,45}; int max=0; int sum=0; int i=0; &nbs.........【阅读全文】
发布时间:2013-10-22 19:29:43
#include <unistd.h>#include <sys/types.h>#include <fcntl.h>#include <stdlib.h>// I.制作大小为100个字节的文件 II.制作任意大小的文件 ./faire_file 5155int main(int argc, char* argv[]){ int n = 0; char buf[100] = {}; int fd = open(argv[1], O.........【阅读全文】
发布时间:2013-10-22 19:26:32
/*1.制作文件1.txt -- 10.txt1.txt 1 2 3 4 5 6 7 8 9 102.txt 11 12 13 14 15 16 17 18 19 20...10.txt 91 92 93 94 95 96 97 98 99 100sprintf(buf,"%d.txt",2);*/#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <sys/mman.h>#include <fcntl.h>#includ.........【阅读全文】