摘要: //有101个数,其中有50个数出现了两次,有一个数只出现了一次,找出出现一次的数#include #include int main(){ int a[11] = {0}; int i; int n = 0; printf("please input the arr :")... 阅读全文
posted @ 2015-04-30 08:11 码农@163 阅读(1188) 评论(0) 推荐(0) 编辑
摘要: 全包含在:conio.h中clrscr:控制台程序清屏!光标回到1,1点voidclrscr(void);textbackground:选择一种新的文本背景色voidtextbackground(intnewcolor);textmode:将屏幕设置为文本模式voidtextmode(intnewm... 阅读全文
posted @ 2015-04-27 20:24 码农@163 阅读(1169) 评论(0) 推荐(0) 编辑
摘要: 文件的操作标准流stdin 标准输入流 stdout 标准输出流 stderr 标准错误流FILE 文件位置指示符 错误指示符 文件结束指示符1,提高速度 使用文件指针2 文件指针与磁盘文件建立联系,以后对文件操作都将通过文件指针来进行。 fopen(文件名,使用文件方式) 文件打开不成... 阅读全文
posted @ 2015-04-18 16:23 码农@163 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 1 #include "stdafx.h" 2 #include 3 #include 4 #define N 80 5 int CopyFile(const char *srcName,const char *dstName); 6 int main() 7 { 8 char src... 阅读全文
posted @ 2015-04-18 11:21 码农@163 阅读(694) 评论(0) 推荐(0) 编辑
摘要: 1 #include "stdafx.h" 2 #include 3 #include 4 #define N 30 5 typedef struct date 6 { 7 int year; 8 int month; 9 int day;10 }DATE;11 typ... 阅读全文
posted @ 2015-04-18 10:52 码农@163 阅读(285) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include #include typedef struct date{ int year; int month; int day;}DATE;typedef struct student{ long studentID; ch... 阅读全文
posted @ 2015-04-18 09:31 码农@163 阅读(1409) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include #include struct student{ char name[10]; int num; int age; char addr[40];};student s1[2],s2[2],*p1,*p2;int main... 阅读全文
posted @ 2015-04-17 16:37 码农@163 阅读(668) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include #includeint main(){ FILE *fp; char ch; char *str = "www.cskaoyan.com"; if(fopen_s(&fp,"ReadMe.txt","at+") != N... 阅读全文
posted @ 2015-04-17 15:39 码农@163 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 文件的操作1,提高速度 使用文件指针2 文件指针与磁盘文件建立联系,以后对文件操作都将通过文件指针来进行。 fopen(文件名,使用文件方式) 文件打开不成功 将返回一个空指针NULL 文件使用方式 r w rb wb fgetc() getc() 从指定文件中一次读取一个字符 ... 阅读全文
posted @ 2015-04-17 14:52 码农@163 阅读(153) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include #include int main(){ FILE *readfile,*writefile; char ch; fopen_s(&readfile,"ReadMe.txt","r"); fopen_s(&writef... 阅读全文
posted @ 2015-04-17 14:36 码农@163 阅读(323) 评论(0) 推荐(0) 编辑