Chinaunix首页 | 论坛 | 博客
  • 博客访问: 84886
  • 博文数量: 99
  • 博客积分: 55
  • 博客等级: 民兵
  • 技术积分: 510
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-20 21:29
文章分类

全部博文(99)

文章存档

2013年(5)

2012年(94)

我的朋友

发布时间:2012-12-28 19:03:07

单向链表#include<stdio.h>#include<stdlib.h>#include<string.h> #define len sizeof(struct student)struct student{char name[10];int age;struct student *next;}; struct student *creat(struct student *head){int n,m;struct student *p1,*p2;printf("Enter number of note:");scanf("%d",&n)......【阅读全文】

阅读(248) | 评论(0) | 转发(0)

发布时间:2012-12-28 19:03:02

    在C的标准函数库里没有去除空白字符的函数,但是实际使用中经常需要去掉字符串首尾的空白字符。尤其是在通讯报文处理,数据库域值处理等。 int TStrTrim( char *str ) {         int l = 0;         char *p = str;         char *......【阅读全文】

阅读(322) | 评论(0) | 转发(0)

发布时间:2012-12-28 19:01:51

assert宏的原型定义在<assert.h>中,其作用是如果它的条件返回错误,则终止程序执行,原型定义: #include <assert.h>void assert( int expression );   assert的作用是现计算表达式 expression ,如果其值为假(即为0),那么它先向stderr打印一条出错信息,然后通过调用 abort 来终止程序运行。请看下面的程序清单badptr.c: #include <stdio.h>#include <assert.h>#include <stdlib.h>in......【阅读全文】

阅读(201) | 评论(0) | 转发(0)

发布时间:2012-12-26 22:00:21

    前面写过一篇北极之北之main函数之前,这篇文章其实解决的问题是main函数并不是第一个执行的函数,在main之前,函数的入口点是_start, _start会调用glibc里的__libc_start_main,main函数只是这个函数的入参。 在__libc_start_main中某一步,会执行main函数。这是上面一篇博文获取到的知识。    前两天,CU的gongping11写了一个博文atexit函数和exit函数的理解,这篇博文提到了atexit可以注册退出函数,在main之后,执行注册退出函数。讲的非常的好,我们......【阅读全文】

阅读(222) | 评论(0) | 转发(0)

发布时间:2012-12-26 21:59:28

  这里使用的是按位加密,按ASCII码进行加密的算法自己写个,很容易的。  #include  #include  #include  #include  void dofile(char *in_fname,char *pwd,char *out_fname);/*对文件进行加密的具体函数*/  void usage(char *name);  void main(int argc,char *argv[])/*定义main()函数的命令行参数*/  {  char in_fname[30];/*用户输入的要加密的文件名*/  char out_fname[30];  char pwd[1......【阅读全文】

阅读(218) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册