自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 资源 (1)
  • 收藏
  • 关注

转载 关于.H和.C的文章

<br />关于.H和.C的文章<br /><br />In general, header files contain declarations and definitions pertaining to functions defined elsewhere. In general, for any external function you call, there will be a header file which contains the prototype declaration for th

2011-05-16 19:30:00 444

原创 把两个字符串分别写入两个不同的文件,在把它们排序后写入另一个文件

<br />#include <stdio.h>#include <stdlib.h>void main(){ FILE *out1,*out2,*in; char c,str[50],temp; int i=0,j; if ( (out1=fopen("2.c","wb")) == NULL ) { perror("2.c"); exit( EXIT_FAILURE ); }

2011-05-14 21:51:00 999

转载 关于流和缓冲区的理解以及一般标准输入问题的解决方法小结

<br />先看两个问题(以下程序运行环境为WIN2000+DEV-C++4.9.9.2):<br />1、执行以下程序:<br /><br />CODE:[Copy to clipboard]/*****************************************************<br />  Name:            copy_bar.c<br />  Copyright:      kernelxu<br />  Author:           kernelxu<br

2011-05-11 15:06:00 1118

转载 fflush(stdin)

<br />1.       为什么 fflush(stdin) 是错的<br /> <br />首先请看以下程序:<br /> <br />                   #include <stdio.h><br /> <br />int main( void )<br />{<br />    int i;<br />    for (;;) {<br />        fputs("Please input an integer: ", stdout);<br />        scanf

2011-05-11 15:04:00 1291

转载 C语言文件操作基本常识

<br />由于程序中经常有大量对文件的输入输出操作,它经常构成了程序的主要部分,因而C语言提供了很多输入输出的函数,它们分别用于两种类型文件输入输出系统:即由ANSI标准定义的缓冲文件(也称标准文件(流)输入输出(I/O)系统);另一类是ANSI标准中没有定义的非缓冲文件(也称非标准文件(流)输入输出(I/O)系统)。<br />我们已经熟悉了通过键盘和显示器进行输入输出的一些函数,如scanf(),printf()等等,这些通过控制台(键盘、显示器等)进行I/O的操作,可以看作标准文件输入输出系统的一些

2011-05-11 14:45:00 692

原创 微软2 写一个函数,检查字符是否是整数,如果是,返回其整数值。

<br />#include <stdio.h>#include <stdlib.h>#include <string.h>int cheat( int p );void main(){ int c; while ( ( c=getchar())!=EOF ) { getchar(); /*用于吃掉空格或回车*/ c = cheat( c ); if ( isalpha( c ) ) printf("no/n"); else

2011-05-10 22:04:00 1547

原创 微软1 有一个整数数组,请求出两两之差绝对值最小的值

<br />#include <stdio.h>#include <math.h>#include <stdlib.h>void main(){ int *p; int min,ca,n,i,j; scanf("%d",&n); p = ( int * )malloc( n*sizeof( int ) ); if ( p == NULL ) { printf("分配内存失败/n"); exit( EXIT_FAILURE ); }

2011-05-10 21:03:00 1817 1

原创 11.3输入一个字符串,自动分配内存,复制

<br />#include <stdio.h>#include <stdlib.h>#include <string.h>char *str_str( char *str ); int main(){ char str[30],*dst; gets( str ); dst = str_str( str ); printf("%s/n",dst); return EXIT_SUCCESS;}char *str_str( char *st

2011-05-04 18:29:00 1029

原创 输入一个单向链表,输出该链表中倒数第k个结点,链表的倒数第0个结点为链表的尾指针

<br />#include <stdio.h>#include <stdlib.h>typedef struct ListNode{ int m_nKey; struct ListNode *m_pNext;} LIST;void print( LIST *head, int n, int k );int main(){ LIST *head,*p1,*p2; int k,n=0; p1 = p2 = ( LIST * )malloc(

2011-05-04 16:47:00 2010

空空如也

空空如也

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

TA关注的人

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