摘要: The header <limits.h> defines constants for the sizes of integral types.The values below are acceptable minimum magnitudes; larger values may beused.CHAR_BIT 8 bits in a charCHAR_MAX UCHAR_MAX orSCHAR_MAXmaximum value of charCHAR_MIN 0 or SCHAR_MIN maximum value of charINT_MAX 32767 maximum va 阅读全文
posted @ 2013-03-21 17:00 freewater 阅读(355) 评论(0) 推荐(0) 编辑
摘要: The header <time.h> declares types and functions for manipulating date and time. Somefunctions process local time, which may differ from calendar time, for example because of timezone. clock_t and time_t are arithmetic types representing times, and struct tm holds thecomponents of a calendar t 阅读全文
posted @ 2013-03-21 15:00 freewater 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 9 Signals: <signal.h>The header <signal.h> provides facilities for handling exceptional conditions that arise duringexecution, such as an interrupt signal from an external source or an error in execution.void (*signal(int sig, void (*handler)(int)))(int)signal determines how subsequent s 阅读全文
posted @ 2013-03-21 14:55 freewater 阅读(275) 评论(0) 推荐(0) 编辑
摘要: The declarations in <setjmp.h> provide a way to avoid the normal function call and returnsequence, typically to permit an immediate return from a deeply nested function call.int setjmp(jmp_buf env)The macro setjmp saves state information in env for use by longjmp. The return iszero from a dire 阅读全文
posted @ 2013-03-21 14:52 freewater 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 7 Variable Argument Lists: <stdarg.h>The header <stdarg.h> provides facilities for stepping through a list of function arguments ofunknown number and type.Suppose lastarg is the last named parameter of a function f with a variable number ofarguments. Then declare within f a variable of t 阅读全文
posted @ 2013-03-21 14:33 freewater 阅读(267) 评论(0) 推荐(0) 编辑
摘要: The assert macro is used to add diagnostics to programs:void assert(int expression)If expression is zero whenassert(expression)is executed, the assert macro will print on stderr a message, such asAssertion failed: expression, file filename, line nnnIt then calls abort to terminate execution. The sou 阅读全文
posted @ 2013-03-21 14:30 freewater 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 5 Utility Functions: <stdlib.h>The header <stdlib.h> declares functions for number conversion, storage allocation, andsimilar tasks. double atof(const char *s)atof converts s to double; it is equivalent to strtod(s, (char**)NULL).int atoi(const char *s)converts s to int; it is equivalent 阅读全文
posted @ 2013-03-21 11:40 freewater 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 4 Mathematical Functions: <math.h>The header <math.h> declares mathematical functions and macros.The macros EDOM and ERANGE (found in <errno.h>) are non-zero integral constants that areused to signal domain and range errors for the functions; HUGE_VAL is a positive double value.A d 阅读全文
posted @ 2013-03-21 11:24 freewater 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 3 String Functions: <string.h>There are two groups of string functions defined in the header <string.h>. The first havenames beginning with str; the second have names beginning with mem. Except for memmove,the behavior is undefined if copying takes place between overlapping objects. Comp 阅读全文
posted @ 2013-03-21 11:17 freewater 阅读(417) 评论(0) 推荐(0) 编辑
摘要: 2 Character Class Tests: <ctype.h>The header <ctype.h> declares functions for testing characters. For each function, theargument list is an int, whose value must be EOF or representable as an unsigned char, andthe return value is an int. The functions return non-zero (true) if the argume 阅读全文
posted @ 2013-03-21 09:37 freewater 阅读(201) 评论(0) 推荐(0) 编辑