自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 C语言switch语句

#include "stdio.h" int main(int argc,char *argv[]) { printf("please input a number:\n"); int num; scanf("%d",&num); printf("\n"); while(1){ switch(num) { case 1: printf("you input num is:%d

2012-03-26 23:22:05 347

原创 C语言读文件(一)

#include "stdio.h" int main(int argc,char *argv[]) { FILE *fp; char ch; fp=fopen("one.txt","rt"); if(fp==NULL) { printf("can not one.txt\n"); getch(); exit(1); } printf("now i can read a

2012-03-26 22:17:24 337

原创 C语言写文件操作(一)

#include "stdio.h" int main(int argc,char *argv[]) { FILE *fp; char ch; fp=fopen("one.txt","wt+"); if(fp==NULL) { printf("can not this file"); getch(); exit(1); } printf("please input a

2012-03-26 22:03:46 238

原创 C语言 写文件操作

#include "stdio.h" int main(int argc,char *argv) { FILE *fp; char ch; if((fp=fopen("aaa.txt","wt+"))==NULL) { printf("Cannot open file!"); getch(); exit(1); } printf("input a string:\n")

2012-03-22 23:40:59 292

原创 C语言 指针连接字符串(二)

#include "stdio.h" int main(int argc,char * argv[]) {  char *connect(char *s1,char *s2);  char s1[80],s2[80];  gets(s1);  gets(s2);  puts(connect(s1,s2));  return 0; } char *connect(char *s1

2012-03-22 14:24:03 1037

原创 C语言连接字符串

#include "stdio.h" int main(int argc,char * argv[]) { char c[40]; char a[20]="ab"; char b[20]="cd"; strcpy(c,strcat(a,b)); printf("c=%s\n",c); // printf(strcat(a,b)); return 0; }

2012-03-22 13:10:28 417

原创 C语言 指针连接两个字符串(一)

#include "stdio.h" int main(int argc,char *argv[]) { char *mystr(char *s1,char *s2); char s1[80],s2[80]; gets(s1); gets(s2); puts(mystr(s1,s2)); return 0; } char *mystr(char *s1,char *s2

2012-03-22 11:15:48 1658

原创 C语言 strcat连接符

#include "stdio.h" int main(int argc,char *argv[]) { char buf[100]="i love"; char *tem="you !"; strcat(buf,tem); puts(buf); getchar(); return 0; }

2012-03-21 23:55:19 339

原创 C语言 头文件(.h)使用方法

//abing.h #include "stdio.h" int plus(int one,int two); char show(char a,char b); //plus.c #include "stdio.h" int plus(int one,int two) { int c=0; c=one+two; return c; } //s

2012-03-21 23:37:06 798

原创 C语言生成TXT文件

#include int main(int argc,char *argv[]) { FILE *fp; fp=fopen(argv[1],"w"); fputs("i love you",fp); fclose(fp); return 0; } Microsoft Windows [版本 6.1.7600] 版权所有 (c) 2009 Micro

2012-03-20 00:03:42 2945

原创 C语言

呵呵

2012-03-19 16:07:14 465

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除