10-08常用的TIME和DATE函数以及各个函数对应的头文件
系统时间和日期函数:
#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);
求"不大与"整数函数
10-08常用的TIME和DATE函数以及各个函数对应的头文件的更多相关文章
- 基于函数的I/O操作(头文件stdio.h)
基于函数库的I/O是C语言标准库的功能,基于系统级I/O函数实现. 系统级I/O函数对文件的标识是文件描述符,C语言标准库中对文件的标识是指向FILE结构的指针.在头文件cstdio或stdio.h中 ...
- gcc 头文件是用户应用程序和函数库之间的桥梁和纽带 功能的真正逻辑实现是以硬件层为基础
gcc GCC, the GNU Compiler Collection - GNU Project - Free Software Foundation (FSF) http://gcc.gnu.o ...
- NSIS文字及字符串函数与头文件介绍
原文 NSIS文字及字符串函数与头文件介绍 文字函数,顾名思义就是处理字符串的函数.使用这些字符串函数前,必须先包含头文件WordFunc.nsh.该头文件目前包含如下一些函数:WordFind.Wo ...
- (三)Linux Shell编程——Shell常用命令(输出、判断、循环、函数、包含)
3. 常用命令 3.1 输出 3.1.1 echo命令 echo是Shell的一个内部指令,用于在屏幕上打印出指定的字符串.命令格式: echo arg name="coding" ...
- JavaScript---js语法,数据类型及方法, 数组及方法,JSON对象及方法,日期Date及方法,正则及方法,数据类型转换,运算符, 控制流程(三元运算),函数(匿名函数,自调用函数)
day46 一丶javascript介绍 JavaScript的基础分为三个 1.ECMAScript:JavaScript的语法标准.包括变量,表达式,运算符,函数,if语句,for语句 ...
- oracle(sql)基础篇系列(一)——基础select语句、常用sql函数、组函数、分组函数
花点时间整理下sql基础,温故而知新.文章的demo来自oracle自带的dept,emp,salgrade三张表.解锁scott用户,使用scott用户登录就可以看到自带的表. #使用ora ...
- C/C++常用头文件及函数汇总
转自: C/C++常用头文件及函数汇总 C/C++头文件一览 C #include <assert.h> //设定插入点#include <ctype.h> //字符处理#in ...
- PHP常用文件函数和目录函数整理
一.常用文件函数库 1.basename(); -- 返回路径中的文件名部分. string basename ( string $path [, string $suffix ] ) //给出一个包 ...
- [SQL SERVER系列]之常用函数和开窗函数介绍及实例
本文主要介绍SQL SERVER数据库中一些常用的系统函数及其SQL SERVER 2005以上支持的开窗函数. 1.常用函数 --从字符串右边截取指定字符数 select RIGHT('HELLO' ...
- Oracle date timestamp 毫秒 - 时间函数总结(转)
原文地址:Oracle date timestamp 毫秒 - 时间函数总结 yyyy-mm-dd hh24:mi:ss.ff 年-月-日 时:分:秒.毫秒 --上一月,上一年select add_ ...
随机推荐
- 【POJ】2778 DNA Sequence(AC自动机+矩阵快速幂)
题目 传送门:QWQ 分析 对着Trie图搞快速幂. 为什么这样是对的呢? 详见:http://www.matrix67.com/blog/archives/276 有些地方还不是很理解......为 ...
- windows中dos命令指南
CMD命令:开始->运行->键入cmd或command(在命令行里可以看到系统版本.文件系统版本)chcp 修改默认字符集chcp 936默认中文chcp 650011. appwiz.c ...
- Delphi7 [Fatal Error] ClassPas.pas(8): File not found: 'DesignIntf.dcu'
Delphi7 [Fatal Error] ClassPas.pas(8): File not found: 'DesignIntf.dcu' Add path to Project>Optio ...
- Maven - Deploy war in Tomcat 7 & 8
This article will explain on how to deploy a war fine in to Tomcat 7 through maven build. Note : I h ...
- Angular: Can't bind to 'ngModel' since it isn't a known property of 'input'问题解决
https://blog.csdn.net/h363659487/article/details/78619225 最初使用 [(ngModel)] 做双向绑定时,如果遇见Angular: Can't ...
- 怎么查看在centos中创建的用户组
用户列表文件:/etc/passwd 用户组列表文件:/etc/group 查看系统中有哪些用户:cut -d : -f 1 /etc/passwd 查看可以登录系统的用户:cat /etc/pass ...
- jboss & eclipse 集成
* 前提: * 安装了 eclipse-jee-3.5.1 * 解压了 jboss5.1 * * "jboss tools" - "J ...
- 使用 Zend_Studio 开发
之前一直用vim 写PHP, 总觉得IDE的一大堆没有用的插件非常麻烦,所以一直避免使用Zend_Studio.不过随着PHP的发展和框架的发展,以及个人的发展,最后还是回到的IDE的时代. 在使用Z ...
- Symfony 从路由认识它
经过上一篇文章之后,我们呢,可以访问这个默认的页面,你也会看到一堆高级的debug工具.好了,这次我们开始更多地了解这个symfony2.0. 首先我们要明白一点,Symfony2 的配置是一个着实很 ...
- python portia
docker run -i -t --rm -v <PROJECTS_FOLDER>:/app/data/projects:rw -p 9001:9001 scrapinghub/port ...