KS X 2012-2007 Information technology-C language in unix environment《UNIX环境下的C语言》.pdf

上传人:progressking105 文档编号:821528 上传时间:2019-02-12 格式:PDF 页数:124 大小:786.46KB
下载 相关 举报
KS X 2012-2007 Information technology-C language in unix environment《UNIX环境下的C语言》.pdf_第1页
第1页 / 共124页
KS X 2012-2007 Information technology-C language in unix environment《UNIX环境下的C语言》.pdf_第2页
第2页 / 共124页
KS X 2012-2007 Information technology-C language in unix environment《UNIX环境下的C语言》.pdf_第3页
第3页 / 共124页
KS X 2012-2007 Information technology-C language in unix environment《UNIX环境下的C语言》.pdf_第4页
第4页 / 共124页
KS X 2012-2007 Information technology-C language in unix environment《UNIX环境下的C语言》.pdf_第5页
第5页 / 共124页
点击查看更多>>
资源描述

1、 KS X 2012 KSKSKSKS SKSKSKS KSKSKS SKSKS KSKS SKS KS C KS X 2012 : 2007 (2012 ) 2007 10 30 http:/www.kats.go.krKS X 2012:2007 : ( ) ( ) SJ ( ) : () ( ) Microsoft IBM KS X 2012:2007 : (http:/www.standard.go.kr) : :1992 12 17 :2007 10 30 :2012 12 28 : 2012-0797 : (JTC1/SC22) ( 02-509-7262) (http:/www.

2、kats.go.kr). 10 5 , . KS X 2012:2007 i 1 1 2 .1 3 .2 3.1 2 3.2 4 4 .9 4.1 9 4.2 .18 4.3 .19 4.4 27 4.5 .28 4.6 .34 4.7 36 4.8 (preprocessing directives) .38 5 (Library).43 5.1 .43 5.2 45 5.3 45 5.4 .51 5.5 54 5.6 59 5.7 .60 5.8 61 5.9 /62 5.10 80 5.11 88 5.12 96 A() C 100 A.1 .100 A.2 .108 A.3 .114

3、KS X 2012 : 2007 (2012 ) C Information technology C language in unix environment 1 C , C . a) C b) C c) C d) C e) C f) C g) 2 . a) LANG , , . LANG locale . b) LC-COLLATE c) LC-CTYPE d) LC-MONETARY e) LC-NUMERlC f) LC-TIME g) Locale . 1 . h) NLSPATH i) (empty string) j) , . , , , . . k) , l) m) n) ,

4、 o) KS X 2012:2007 2 . “ ” “ ” . p) . q) . . , . , . r) 2 s) . . t) (decimal-point character) . , setlocale . u) (string) . . v) w) x) . “” “ ” . y) (alignment) z) , , . . aa) ab) (local custom) , , ac) (localization) , , ad) ae) KS X 1001, ( ) af) . , “W” . 3 3.1 3.1.1 C . . #include . . , , . , .

5、 . a) ( ) KS X 2012:2007 3 . b) . , . c) ( ) . . , . . d) , . #include 1 4 . e) (escape sequence) . f) , . g) . . . h) . . . ( ) . . 3.1.2 2 . C . ( ) . . . a) (C ) . . . . b) , . main. . . int main (void)/*/ 2 ( , argc argv ) . int main (int argc, char *argv) /*/ main , . 1) argc . 2) argvargc . 3)

6、 argc 0 , argv0 argvargc-1 . . KS X 2012:2007 4 . , . 4) argc 0 , argv0 . argv00 . argc 1 argv1 argvargc-1 . 5) argc argv argv , . , , , . main main exit . main . c) , , . . (sequential point) , . . ( ). , . . , . . 1) , . 2) . 3) 5.9 . . 3.2 3.2.1 2 . . . 0 (null character) , . . KS X 2012:2007 5 2

7、6 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 26 a b c d e f g h i j k l m n o p q r s t u v w x y z 10 10 0 1 2 3 4 5 6 7 8 9 29 ! # % ? - 1 , , (form feed) . , . , , (carrige return), . ( , , , , ) . a) . , . . 1) 3.2 . 2) , (locale-specific). 3) (state-dependent) . 4) 0 . 5) 0 2 . . 1) ,

8、 . 2) , , . 3.2.2 fputc . (isprint ) , . . . . a() . . b() . KS X 2012:2007 6 . f( ) n() r() t( ) . . v( ) . . 3.2.3 ( , , ) , . ( ) . , . 3.2.4 a) 1 . 1) , , 15 2) 8 3) , , , 12 , , 4) 31 5) 32 6) 31 7) 6 8) 511 9) 127 10) 1024 11) 31 12) 31 13) 31 14) 509 15) 509 ( ) 16) 32767( ) 17) #include 8 1

9、8) switch 257 case ( switch ) 19) 127 20) 127 21) 15 b) (limits. h (float. h . 1) (limits.h CHAR-BIT MB-LEN-MAX . KS X 2012:2007 7 , () . 1.1) () CHAR_BIT 8 1.2) signed char SCHAR_MIN 127 1.3) signed char SCHAR_MAX 127 1.4) unsigned shar UCHAR_MAX 255 1.5) char CHAR_MIN 127, 0 1.6) char CHAR_MAX 127

10、 255 1.7) MB_LEN_MAX 2 1.8) short int SHRT_MIN 32764 1.9) short int SHRT_MAX 32767 1.10) unsigned short int USHRT_MAX 65535 1.11) int INT_MIN 32767 1.12) int INT_MAX +32767 1.13) unsigned int UINIT_MAX 65535 1.14) long int LONG_MIN 2147483647 1.15) long int LONG_MAX 2147483647 1.16) unsigned long i

11、nt ULONG_MAX 4294967295 2) . KS X 2012:2007 8 s (1) b , ( 1) e (e min e max ) p ( b ) f kb x(f 1 0, x0) . xsb e p 1 k k f b K , e min e e max FLT-RADIX #if . . FLT-RADIX FLT-ROUNDS 3 . FLT-ROUNDS . FLT-ROUNDS . 1 0 0 1 2 3 FLT-RADIX . , () . 2.1) FLT_RADIX 2 2.2) FLT-RADIX FLT_MANT_DIG DBL_MANT_DIG

12、LDBL_MANT_DIG 2.3) q q b p , q . (p1)*log 10 b FLT_DIG 6 DBL_DIG 10 LDBL_DIG 10 2.4) FLT-RADIX 1 (e min ). FLT_MIN_EXP DBL_MIN_EXP LDBL_MIN_EXP 2.5) 10 . 1og 10 b e (e e min 1) FL T_MIN_10_EXP 37 DBL_MIN_10_EXP 37 LDBL_MIN_10_EXP 37 2.6) FLT-RADIX 1 (e max ). FLT_MAX_EXP 1, b 10 0, KS X 2012:2007 9

13、DBL_MAX_EXP LDBL_MAX_EXP 2.7) 10 . log 10 (1b p )b e (e e max ) FLT_MAX_10_EXP 37 DBT_MAX_10_EXP 37 LDBL_MAX_10_EXP 37 () . 2.8) (1b -p )b e (e e max ) FL T_MAX 1E 37 DBL_MAX 1E 37 LDBL_MAX 1E 37 () . 2.9) 1 1 (b 1P ) FLT_EPSILON 1E5 DBL_EPSILON 1E9 LDBL_EPSILON 1E 9 2.10) (:b :e min 1) FL T_MIN 1E

14、37 DBL_MIN 1E 37 LDBL_MIN 1E 37 4 4.1 a) token: keyword identifier constant string-literal operator punctuator preprocessing-token: header-name identifier pp-number character-constant string-literal operator punctuator KS X 2012:2007 10 b) , . (keyword), (identifier), (constant), (string literal), (

15、operator), (punctuator) . (preprocessing token) . (header name), , (preprocessing number), (character constant), , , (non-white-space) . “ ” . (white-space) , (space), / , , . . , . 4.1.1 a) keyword: auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile do if static while b) ( ). 4.1.2 a) identifier: nondigit identifier nondigit identifier digit nondigit: - a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P

展开阅读全文
相关资源
猜你喜欢
  • KS C IEC 60749-16-2006 Semiconductor devices-Mechanical and climatic test methods-Part 16:Particle impact noise detection(PIND)《半导体器件 机械和气候试验方法 第16部分 粒子冲击噪声探测(PIND)》.pdf KS C IEC 60749-16-2006 Semiconductor devices-Mechanical and climatic test methods-Part 16:Particle impact noise detection(PIND)《半导体器件 机械和气候试验方法 第16部分 粒子冲击噪声探测(PIND)》.pdf
  • KS C IEC 60749-17-2006 Semiconductor devices-Mechanical and climatic test methods-Part 17:Neutron irradiation《半导体器件 机械和气候试验方法 第17部分 中子辐照》.pdf KS C IEC 60749-17-2006 Semiconductor devices-Mechanical and climatic test methods-Part 17:Neutron irradiation《半导体器件 机械和气候试验方法 第17部分 中子辐照》.pdf
  • KS C IEC 60749-18-2006 Semiconductor devices-Mechanical and climatic test methods-Part 18:Ionizing radiation(total dose)《半导体器件 机械和气候试验方法 第18部分 电离辐射(总剂量)》.pdf KS C IEC 60749-18-2006 Semiconductor devices-Mechanical and climatic test methods-Part 18:Ionizing radiation(total dose)《半导体器件 机械和气候试验方法 第18部分 电离辐射(总剂量)》.pdf
  • KS C IEC 60749-23-2006 Semiconductor devices-Mechanical and climatic test methods-Part 23:High temperature operating life《半导体器件 机械和气候试验方法 第23部分 高温操作寿命》.pdf KS C IEC 60749-23-2006 Semiconductor devices-Mechanical and climatic test methods-Part 23:High temperature operating life《半导体器件 机械和气候试验方法 第23部分 高温操作寿命》.pdf
  • KS C IEC 60749-24-2006 Semiconductor devices-Mechanical and climatic test methods-Part 24:Accelerated moisture resistance-Unbiased HAST《半导体器件 机械和气候试验方法 第24部分 加速抗湿性 无偏HAST》.pdf KS C IEC 60749-24-2006 Semiconductor devices-Mechanical and climatic test methods-Part 24:Accelerated moisture resistance-Unbiased HAST《半导体器件 机械和气候试验方法 第24部分 加速抗湿性 无偏HAST》.pdf
  • KS C IEC 60749-31-2006 Semiconductor devices-Mechanical and climatic test methods-Part 31:Flammability of plastic-encapsulated devices(internally induced)《半导体器件 机械和气候试验方法 第31部分 塑料密.pdf KS C IEC 60749-31-2006 Semiconductor devices-Mechanical and climatic test methods-Part 31:Flammability of plastic-encapsulated devices(internally induced)《半导体器件 机械和气候试验方法 第31部分 塑料密.pdf
  • KS C IEC 60749-32-2006 Semiconductor devices-Mechanical and climatic test methods-Part 32:Flammability of plastic-encapsulated devices(externally induced)《半导体器件 机械和气候试验方法 第32部分 塑料密.pdf KS C IEC 60749-32-2006 Semiconductor devices-Mechanical and climatic test methods-Part 32:Flammability of plastic-encapsulated devices(externally induced)《半导体器件 机械和气候试验方法 第32部分 塑料密.pdf
  • KS C IEC 60749-8-2006 Semiconductor devices-Mechanical and climatic test methods-Part 8:Sealing 《半导体器件 机械和气候试验方法 第8部分 密封》.pdf KS C IEC 60749-8-2006 Semiconductor devices-Mechanical and climatic test methods-Part 8:Sealing 《半导体器件 机械和气候试验方法 第8部分 密封》.pdf
  • KS C IEC 60759-2009 Standard test procedures for semiconductor X-ray energy spectrometers《半导体X射线能谱仪的标准试验程序》.pdf KS C IEC 60759-2009 Standard test procedures for semiconductor X-ray energy spectrometers《半导体X射线能谱仪的标准试验程序》.pdf
  • 相关搜索

    当前位置:首页 > 标准规范 > 国际标准 > 其他

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1