处理 SSI 文件时出错

C语言中关于内存管理(题与分析)

     逍遥天子 发表于 2007-2-27 23:32:00
NO.1
void GetMemory(char *p)
{
   p = (char *)malloc(100);
}

void Test(void)
{
   char *str = NULL;
   GetMemory(str);
   strcpy(str,"hello world");
   printf(str);
}
请问运行Test函数后会是什么样的结果?

NO.2
char *GetMemory(void)
{
   char p[] = "hello world";
   retrun p;
}

void Test(void)
{
   char *str = NULL;
   str = GetMemory();
   printf(str);
}
问题同NO.1

NO.3
void GetMemory2(char **p, int n
……

C语言中关于时间的函数

     逍遥天子 发表于 2007-2-27 16:13:00

本文从介绍基础概念入手,探讨了在C/C++中对日期和时间操作所用到的数据结构和函数,并对计时、时间的获取、时间的计算和显示格式等方面进行了阐述。本文还通过大量的实例向你展示了time.h头文件中声明的各种函数和数据结构的详细使用方法。

关键字:UTC(世界标准时间),Calendar Time(日历时间),epoch(时间点),clock tick(时钟计时单元)


……

C语言的排序算法

     逍遥天子 发表于 2007-2-27 16:03:00

#i nclude "stdio.h"       //冒泡排序
#i nclude "stdlib.h"
#define M 10

int a(M);  //定义为全局变量

void PRand()
{
   int m,i;
   i=0;
   while(i<M)
   {
   m=rand();   //随机产一个数字
   m=m%100+1;  //将随机产生的数字控制在1-100之间

   a[i++]=m;  
   }
}

void bublle()
{
int flag;
int i,j,temp;


……

首页 上一页 下一页 尾页 页次:1/1页  10篇日志/页 转到:

处理 SSI 文件时出错