10-08

来源:互联网 发布:矩阵的秩怎么算 编辑:程序博客网 时间:2024/05/16 09:00
系统时间和日期函数:
    #include <time.h>
    char *asctime(const struct tm *tm);//将tm中存放的信息转换为标准格式
    char *asctime_r(const struct tm *tm, char *buf);//分配了最少26个字节的缓冲区来存放转换后的时间
    char *ctime(const time_t *timep);//将time_t中存放的信息转换为标准格式
    char *ctime_r(const time_t *timep, char *buf);//同asctime_r
    struct tm *gtime(const time_t *timep);//将time_t结构提中的时间转换为当地时间,存放在tm结构体中
    struct tm *gtime_r(const time_t *timep, struct tm *result);//同ctime_r
    struct tm *localtime(const time_t *timep);//取当地时间,并转换为标准格式,放在tm中
    struct tm *localtime_r(const time_t *timep, struct tm *result);//取当地时间放在tm结构体的result中
    time_t mktime(struct tm *tm);//将tm所指向的结构体数据转换为从1970年1月1日0时0分0秒开始所经历的秒数
    int gettimeofday(struct timeval *tv, struct timezone *tz);//获取当前时间,放在tv中,tz用于存放相应的时钟信息
    int settimeofday(const struct timeval *tv, const struct timezone *tz);//设置当前时间和时区信息。参数同上    

    随机数产生函数:#include <stdlib.h>  void rand(void);    void srand(unsigned int seed);

大小写字母测试函数:#include <ctype.h>
         int isupper(int c);
        int isalnum(int c);
        int isalpha(int c);
        int isascii(int c);
        int isblank(int c);
        int iscntrl(int c);
        int isdigit(int c);
        int isgraph(int c);
        int islower(int c);    
        int isprint(int c);
        int ispunct(int c);
        int isspace(int c);
        int isxdigit(int c);
系统时间和日期函数:#include <time.h>
        
系统登陆用户名操作函数:
    #include <stdlib.h>
    char *getenv(const char *name);
    #include <stdlib.h>
    int unsetenv(const char *name);
    int setenv(const char *name);
单字符输出函数:
    #include <stdio.h>
    int putchar(int c);
求"不大与"整数函数   

0 0