Microsoft PowerPoint - ICP_02_Basic_Data_Type.ppt [相容模式]

Size: px
Start display at page:

Download "Microsoft PowerPoint - ICP_02_Basic_Data_Type.ppt [相容模式]"

Transcription

1 Introduction to Computer and Program Design Lesson 2 Basic Data Types James C.C. Cheng Department of Computer Science National Chiao Tung University

2 The basic data types 變數 (variable) 是甚麼? 變數代表了一塊可以記錄資料的記憶體空間, 我可以透過變數的名稱對這塊記憶體空間進行讀取寫入資料的動作任何變數在使用前都必須被宣告過宣告一個變數時, 你必須明確的指出變數的資料型態 (data type) 是甚麼, 以及變數的名稱是甚麼? 為什麼有資料型態? 因為這樣才能決定變數要記憶體多少空間. int x = 1000; short y = 100; char c1 = A, c2 = B ; float f = f; double d = ; address (in byte) data(4 byte, 32bit) Byte0, Byte1, Byte2, Byte3 26E81E00 E E81E E81E E 3F 26E81E0C 6E 86 1B F0 26E81E10 F

3 電腦的計量單位 1 位元 bit = {0, 1} 1 nibble = 4 bit 1 位元組 byte = 1 word = 8 bit 1 Kbyte(kilo) = 2 10 byte = 1024 byte 1 Mbyte(mega) = 2 10 Kbyte = 2 20 byte 1 Gbyte(giga) = 2 10 Mbyte = 2 20 Kbyte = 2 30 byte 1 Tbyte(tera) = 2 10 Gbyte 1 Pbyte(peta) = 2 10 Tbyte 1 Ebyte(exa) = 2 10 Pbyte 1 Zbyte(zetta) = 2 10 Ebyte 1 Ybyte(yotta) = 2 10 Zbyte 3

4 The basic data types 在 C 語言中, 共有 13 種基本資料型態可以使用 Name Size (byte) Range char to 127 unsigned char 1 0 to 255 short to unsigned short 2 0 to int to unsigned int 4 0 to long to unsigned long 4 0 to int64, long long to unsigned int to float 4 ±( e -38 to e 38 ) double 8 ±( e -308 to e 308 ) long double 12 in DevC++, 8 in MSC The same as double C++ 另外又提供一種新的資料型態 bool 用來表示布林值 boolean value, 也就是 true or false bool 的 size 每家 Compiler 皆不同, 大部分是 1 個 byte. 4

5 The basic data types 如何知道一個變數佔了多少記憶體空間? sizeof 用法 : size_t sizeof( name ); 其中 size_t 在一般的個人電腦是 unsigned int sizeof(type name) ex: sizeof(int); sizeof(double); sizeof(variable name) ex: int x; sizeof(x); double d; sizeof(d);

6 練習題 把 C++ 共有 14 種基本資料型態 ( 包含 bool) 利用 sizeof, 請把他們所佔的記憶體空間顯示在螢幕上, 例如 char 1byte int 4 byte unsigned int 4 byte 6

7 Integers 屬於整數的資料型態有 : bool, char, short, int, long, int64 unsigned char, unsigned short, unsigned int, unsigned long, unsigned int64 7

8 Integers 十進位系統 Decimal system 每個 digit 由 0~9 表示 = ( 3 x 10 3 ) + ( 4 x 10 2 ) + ( 7 x 10 1 ) + ( 2 x 10 0 ) 二進位系統 Binary system 每個 digit 由 0 and1 表示 = (1 x 2 3 ) 10 + (0 x 2 2 ) 10 + (1 x 2 1 ) 10 + (1 x 2 0 ) 10 = = 1 2 ; 1+1 = 10 2 十六進位系統 Hexadecimal system 每個 digit 由 0~9, A, B, C, D, E and F 表示 3A7C = (3 x 16 3 ) 10 + (10 x 16 2 ) 10 + (7 x 16 1 ) 10 + (12 x 16 0 ) 10 = (2+7) 16 = 9 16 ; (1+9) 16 = A 16 ; (2+B) 16 = D 16 ; (9+9) 16 =

9 Integers 將二進位轉成 16 進位 由右至左, 將每四個二進位的 digit 分類 = 0011,0011,1010,1101 參照右表來轉 16 進位 0011,0011,1010,1101 = 33AD Hex Binary A 1010 B 1011 C 1100 D 1101 E 1110 F

10 Integers 無號整數 Unsigned Integer 1 bit: 0, 1 4 bit: 0 ~ (2 4 1) 10 = 0 ~ byte: 0 ~ (2 8 1) 10 = 0 ~ byte: 0 ~ (2 16 1) 10 = 0 ~ 65, byte: 0 ~ (2 32 1) 10 = 0 ~ 4,294,967,

11 Integers 有號整數 Signed integer 假設我們要用一個 byte 來表示一個有號整數 方法 1: sign bit Sign bit = -27 = 27 可表示的整數範圍 : ( 0 ~ 2 7 1) = (0 ~ 127) 優點 : 簡單 缺點 : 會有負零 不能做加法及減法 1001, , = 1011, = -54!? 11

12 Data representation 有號整數 Signed integer 方法 2: 1 的補數 (one s complement) 27 = 0001, = -(0001, ) 0/1 反轉 1110, 可表示的整數範圍 : ( 0 ~ 2 7 1) = (0 ~ 127) 優點 : 簡單 可做加法及減法 1110, , = 1111, = , , = 1110, = -26 缺點 : 會有負零 12

13 Data representation 有號整數 Signed integer 方法 3: 2 的補數 (two s complement) 27 = 0001, = 1,0000, , = 1110, 可表示的整數範圍 : ~ -1, 0, 1 ~ (2 7 1) = -128 ~ 127 優點 : 不會有負零 可做加法及減法 1110, , = 1,0000, (max 8 bit) = 0000, = , , = 1110, = -(1,0000, , ) = -(0001,1010) = -26 缺點 : 轉換需要一點時間 但是一般電腦都有硬體支援, 所以這已不算缺點了 13

14 Integers 常數 constants: bool bt = true, bf = false, btrue = 5438, bfalse = 0; false 就是零 ; true 就是非零的整數. char ca = A, cb = 66, cc= 65603, cd = 0x43, ce = 0105, center = \n ; 十六進位常數 Hex constant: 在整數常數前面加上 0x 八進位常數 Octal constant: 整數常數前面加上 0 short i = 10, j = 32767, k = , s = 32768, t = ; int x = 10, y = -100, z = 0x02AB2F; int nmax = ; int nmina = ; // It causes a warning message int nminb = ( ); // OK! 所有整數常數都會被視為 int. 負整數常數是由負號加上正整數常數. 所以, int x = int x = - ( ) 14

15 Integers 常數 constants: long n = 120, m = 12345L, a = 0xFFFFL; 長整數常數 : 在數字後面加上 L int64 nn = 10, mm = LL; 長整數常數 : 在數字後面加上 LL 以 printf 方式印出 64-bit integer: int64 nn = 10; long long mm = LL ; printf("%lld, %I64d \n", nn, mm); // OK, using ll or I64 /* 注意是小寫的 l 大寫 L 代表 long double float point number */ printf( %d, %I64d \n, nn, mm); // The output is not correct! 15

16 Integers 常數 constants: unsigned char, unsigned short and unsigned int unsigned char uc = -1; unsigned short us = -1; unsigned int ui = -1; cout << (int)uc << endl; cout << us << endl; cout << ui << endl; unsigned long : 數字後面加上 UL unsigned long un0 = 123UL, un1 = -1UL; unsigned int64 : In Dev C++, 數字後面加上 LLU In VC++, 數字後面加上 ULL unsigned long long unn0 = 123LLU, unn1 = -1LLU; 16

17 Integers 型態轉換 typecast 小會配合大 small large short s1 = 10; int n1 = 0xFF0000; if(n1 > s1) cout << "Hello"; // short 會變成 int long long nn = 0x7FFFFFFF ULL; if(nn > n1) cout << "World! << endl; // int 會變成 int64 有號會配合無號 signed unsigned unsigned int u= 0; int i = -1; if(i>u) cout << "-1 > 0 << endl; // int 會變成 uint 17

18 Float point numbers 單精度浮點數 float, 32-bit IEEE-754 float point number 雙精度浮點數 double, 64-bit IEEE-754 float point number 加長 (?) 雙精度浮點數 long double, ANSI-C 並未制訂此標準, 因此, 請勿使用! 在 VC++, long double = double 在 Dev C++, long double 是 12 byte, 但是只會用到 8 byte, 所以用處等同 double 18

19 Float point numbers 為什麼 IEEE 要設計浮點數的儲存格式? 實數未必能轉成二進位碼 = ( 3 x 10-1 ) + ( 4 x 10-2 ) + ( 7 x 10-3 ) + ( 2 x 10-4 ) = (1 x 2-1 ) 10 + (0 x 2-2 ) 10 + (1 x 2-3 ) 10 + (1 x 2-4 ) 10 = = =?? 2 19

20 Float point numbers IEEE 754 (The IEEE Standard for Floating-Point Arithmetic) IEEE, Institute of Electrical and Electronics Engineers 國際電子電機學會 32-bit IEEE-754 浮點數的儲存格式 正負號 (Sign): 1bit 指數部分 (Exponent): 8 bit ( 偏移量是 127) 小數部分 (Fraction or mantissa): 23 bit 64-bit IEEE-754 浮點數的儲存格式 : 正負號 (Sign): 1bit 指數部分 (Exponent): 11 bit ( 偏移量是 1023) 小數部分 (Fraction or mantissa): 52 bit mantissa 20

21 Float point numbers IEEE 754 (The IEEE Standard for Floating-Point Arithmetic) Example: = = * 2 3 For 32 bit float: = (-1) 0 * * Sign = 0 Exponent = 130 = Fraction = For 64 bit float: = (-1) 0 * * Sign = 0 Exponent = 1026= Fraction =

22 = Float point numbers 浮點數的加法與減法 = = (-1) 0 * 2 3 * (-1) 0 * 2-3 * = 2 3 * * 2-6 * = 2 3 * * = 2 3 * = = = (-1) 0 * 2 3 * (-1) 1 * 2-3 * = 2 3 * (-1) * 2 3 * 2-6 * = 2 3 * (-1) * 2 3 * = 2 3 * * } 2's complement =2 3 * (Overflow) 2 3 *

23 Float point numbers 捨去與進位 Truncation and Rounding Example: = 1,0010,1101,0110,1000, ,0011, = ,1101,0110,1000, ,0011, * 2 20 For 32 bit float: = (-1) 0 * ,1101,0110,1000, ,0011, * Sign = 0 Exponent = 147 = Fraction (23 bit) = 0010,1101,0110,1000, ,0011, Truncation = 0010,1101,0110,1000, Rounding ( ) = 1,0010,1101,0110,1000, ,0110,0110,... 2 = ,1101,0110,1000, ,0110, * 2 20 For 32 bit float: = (-1) 0 * ,1101,0110,1000, ,0110, * Sign = 0 Exponent = 147 = Fraction (23 bit) = 0010,1101,0110,1000, ,0110, Truncation = 0010,1101,0110,1000, ( ) 23

24 Float point numbers Floating point: IEEE 754 Float Values (b = bias) Sign Exponent (e ) Fraction (f ) Value ~ Positive Denormalized Real f 2 (-b+1) ~ XX..XX Positive Normalized Real f 2 (e-b) Infinity ~ NaN 24

25 Float point numbers Floating point: IEEE 754 Sign Exponent (e) Fraction (f) Value ~ Negative Denormalized Real f 2 (-b+1) ~ XX..XX Negative Normalized Real f 2 (e-b) Infinity ~ NaN 25

26 Float point numbers 浮點數的常數表示法 : float f = f; 在數字後加上 f double r0 = , r1 = 123, r2 = 0x64, r3 = 123LLU; 任何形式的數值常數皆可視為 double 浮點數的型態轉換 int float float fx = 33.3f; cout << fx * 2 / 3 << endl; float double #include <float.h> float fx = 0.0f; double dx = fx + DBL_MIN; cout << dx << endl; 26

27 Float point numbers 千萬不可直接判斷一個浮點樹是否等於零 float A = f; float B = f; if(a * f - B == 0.0) cout << "!" << endl; else cout << A * f << endl; 27

28 字元 characters 字元是 1byte (8bit) 的整數 通常用來存放 ASCII (American Standard Code for Information Interchange) 碼 '0'~'9': 48~57 'A'~'Z': 65~90 'a'~'z': 97~122 其他 ASCII 碼請參考 字元的常數表示法 用單引號 ' char a = 'A'; cout << a << endl; a = '9'; cout << a << endl; a = 'xyz'; cout << a << endl; char a = 50, b = 70, c= 100; cout << a << b << c << endl; 28

29 字元 characters 特殊功能的字元常數 '\n': newline 換行 '\t': Tab '\b': backspace 倒退 '\r': return key 游標歸零 '\'': 單引號 '\"': 雙引號 '\\': 反斜線 '\0': 空字元 '\ 三位數整數 ': 以八進位數字直接表示 ASCII '\x 整數 ': 以十六進位數字直接表示 ASCII char a = 'X', b = '\t', c= 'Y', d = '\n'; char e = '\050', f = '\'', g = '\"', h = '\\'; cout << a << b << c << d << e << f <<g << h << endl; a = '\x41'; b = '\b'; cout << a << a << a << b << ' ' << endl; 29

30 字串 C-style strings 字串是一個字元的陣列 (characters array), 也就是一整串連續的字元集合 字串最後一個字必須是 \0, 也就是內部數值為零的字元 字串的常數表示法 : 用雙引號 " 字串的宣告有三種, 各有不同用途, 如下例 : char s1[5] = "abcd"; // 以陣列方式宣告 char s2[] = "xyz"; // 也是以陣列方式宣告 char* s3 = "uvw"; // 以字元指標方式宣告 cout << s1 << s2 << s3 << endl; 字串在宣告時的初始值設定有很多變化, 要小心使用 : char s1[5] = "abcd"; char s2[5] = { 'A', 'B', 'C', 'D', 0}; char s3[] = "xyz"; char s4[] = { 'X', 'Y', 'Z', 0}; char* s5 = "uvw"; s1[0] = 'T'; // OK! s5[0] = 'T'; // Runtime error char* s6 = { 'U', 'V', 'W', 0}; // Compiler error 30

31 C-style strings 宣告後的字串, 請小心使用等號 char s1[] = "abcd"; char s2[] = "ABCD"; s1 = s2; // Compiling error! 任何陣列的名稱都不可為左值 ( 放在等號左邊 ) char *s1 = "abcd"; char s2[] = "ABCD"; cout << s1 << s2 << endl; s1 = s2; // 但是指標可以為左值 cout << s1 << s2 << endl; // ABCD, ABCD s2[0] = 'T'; // 但是要小心邊際效應 ( 改了一個地方卻也會影響別人 ) cout << s1 << s2 << endl; // TBCD, TBCD 31

32 型態轉換 Typecast 在 C 語言任何兩變數皆可以互相轉換 用法 : Ex: x = (x 的型態名稱 ) y; int n = 1234; float f = (float) n; char c = (char) f; double d = (double) c; 32

33 #define 用途 : 以名稱來定義一個常數 用法 : #define 常數名稱 compiler 會在編譯程式碼之前, 將程式碼中所有你定義的名稱替換成對應的常數. Ex: #define PI #define EXP #define NULL_STR double p = PI; cout << p << endl; // cout << EXP << endl; // cout << NULL_STR << endl; // Compile Error cout << NULL_STREXP<< endl; // Compile Error cout << NULL_STR EXP << endl; //

34 #define Macro, 巨集 Ex: #define MIN_INT(x) ( ) #define INC(x) (++x) #define ADD(x, y) (x+y) #define MIN(x, y) (x<y?x:y) #define _MIN(x, y) x<y?x:ytice 請注意括號! float x = PI * MIN(2.0f, 3.0f); // x = float y = PI * _MIN(2.0f, 3.0f); // y = 3.0!? 34

35 #define 請勿使用 #define 來定義一個資料型態 Ex: #define uint unsigned int uint a, b ; // OK! a and b are unsigned int char *s1 = " Hello ", *s2 = " World "; // 若要宣告兩個字串, 每個字串名稱前都要加上 * #define CSTR char * CSTR s3 = " OK ", s4 = " oops "; // s4 不是字串! Compiler error! 35

36 typedef 請使用 typedef 來定義一個資料型態 用法 : typedef 原來的資料型態名稱 新的資料型態名稱 ; EX: 注意要加分號 typedef unsigned int uint; uint a, b ; // OK! a and b are unsigned int typedef char * cstr; cstr sa = Hello", sb = world!"; printf("%s, %s\n", sa, sb ); // OK! 36

C/C++语言 - C/C++数据

C/C++语言 - C/C++数据 C/C++ C/C++ Table of contents 1. 2. 3. 4. char 5. 1 C = 5 (F 32). 9 F C 2 1 // fal2cel. c: Convert Fah temperature to Cel temperature 2 # include < stdio.h> 3 int main ( void ) 4 { 5 float fah, cel ;

More information

C C

C C C C 2017 3 8 1. 2. 3. 4. char 5. 2/101 C 1. 3/101 C C = 5 (F 32). 9 F C 4/101 C 1 // fal2cel.c: Convert Fah temperature to Cel temperature 2 #include 3 int main(void) 4 { 5 float fah, cel; 6 printf("please

More information

CHAPTER VC#

CHAPTER VC# 1. 2. 3. 4. CHAPTER 2-1 2-2 2-3 2-4 VC# 2-5 2-6 2-7 2-8 Visual C# 2008 2-1 Visual C# 0~100 (-32768~+32767) 2 4 VC# (Overflow) 2-1 2-2 2-1 2-1.1 2-1 1 10 10!(1 10) 2-3 Visual C# 2008 10! 32767 short( )

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

Microsoft PowerPoint - STU_EC_Ch02.ppt

Microsoft PowerPoint - STU_EC_Ch02.ppt 樹德科技大學資訊工程系 Chapter 2: Number Systems Operations and Codes Shi-Huang Chen Sept. 2010 1 Chapter Outline 2.1 Decimal Numbers 2.2 Binary Numbers 2.3 Decimal-to-Binary Conversion 2.4 Binary Arithmetic 2.5

More information

C/C++程序设计 - 字符串与格式化输入/输出

C/C++程序设计 - 字符串与格式化输入/输出 C/C++ / Table of contents 1. 2. 3. 4. 1 i # include # include // density of human body : 1. 04 e3 kg / m ^3 # define DENSITY 1. 04 e3 int main ( void ) { float weight, volume ; int

More information

3.1 num = 3 ch = 'C' 2

3.1 num = 3 ch = 'C' 2 Java 1 3.1 num = 3 ch = 'C' 2 final 3.1 final : final final double PI=3.1415926; 3 3.2 4 int 3.2 (long int) (int) (short int) (byte) short sum; // sum 5 3.2 Java int long num=32967359818l; C:\java\app3_2.java:6:

More information

C/C++ - 函数

C/C++ - 函数 C/C++ Table of contents 1. 2. 3. & 4. 5. 1 2 3 # include # define SIZE 50 int main ( void ) { float list [ SIZE ]; readlist (list, SIZE ); sort (list, SIZE ); average (list, SIZE ); bargragh

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

Microsoft PowerPoint - C_Structure.ppt

Microsoft PowerPoint - C_Structure.ppt 結構與其他資料型態 Janet Huang 5-1 結構的宣告 struct 結構名稱 struct 結構名稱變數 1, 變數 2,, 變數 m; struct 結構名稱 變數 1, 變數 2,, 變數 m; student; student; 5-2 1 結構變數初值的設定 struct 結構名稱 struct 結構名稱變數 = 初值 1, 初值 2,, 初值 n student="janet","1350901",100,95

More information

C

C C 2017 3 14 1. 2. 3. 4. 2/95 C 1. 3/95 C I 1 // talkback.c: 2 #include 3 #include 4 #define DENSITY 62.4 5 int main(void) 6 { 7 float weight, volume; 8 int size; 9 unsigned long letters;

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

C/C++ - 文件IO

C/C++ - 文件IO C/C++ IO Table of contents 1. 2. 3. 4. 1 C ASCII ASCII ASCII 2 10000 00100111 00010000 31H, 30H, 30H, 30H, 30H 1, 0, 0, 0, 0 ASCII 3 4 5 UNIX ANSI C 5 FILE FILE 6 stdio.h typedef struct { int level ;

More information

WWW PHP Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2

WWW PHP Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2 WWW PHP 2003 1 Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2 Comments PHP Shell Style: # C++ Style: // C Style: /* */ $value = $p * exp($r * $t); # $value

More information

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc 2 5 8 11 0 13 1. 13 2. 15 3. 18 1 23 1. 23 2. 26 3. 28 2 36 1. 36 2. 39 3. 42 4. 44 5. 49 6. 51 3 57 1. 57 2. 60 3. 64 4. 66 5. 70 6. 75 7. 83 8. 85 9. 88 10. 98 11. 103 12. 108 13. 112 4 115 1. 115 2.

More information

51 C 51 isp 10 C PCB C C C C KEIL

51 C 51 isp 10   C   PCB C C C C KEIL http://wwwispdowncom 51 C " + + " 51 AT89S51 In-System-Programming ISP 10 io 244 CPLD ATMEL PIC CPLD/FPGA ARM9 ISP http://wwwispdowncom/showoneproductasp?productid=15 51 C C C C C ispdown http://wwwispdowncom

More information

untitled

untitled 不 料 料 例 : ( 料 ) 串 度 8 年 數 串 度 4 串 度 數 數 9- ( ) 利 數 struct { ; ; 數 struct 數 ; 9-2 數 利 數 C struct 數 ; C++ 數 ; struct 省略 9-3 例 ( 料 例 ) struct people{ char name[]; int age; char address[4]; char phone[]; int

More information

Microsoft PowerPoint - 02_運算.pptx

Microsoft PowerPoint - 02_運算.pptx 回顧 第一個程式 基本架構 五行必寫的公式 註解的寫法 cout

More information

C/C++语言 - 运算符、表达式和语句

C/C++语言 - 运算符、表达式和语句 C/C++ Table of contents 1. 2. 3. 4. C C++ 5. 6. 7. 1 i // shoe1.c: # include # define ADJUST 7. 64 # define SCALE 0. 325 int main ( void ) { double shoe, foot ; shoe = 9. 0; foot = SCALE * shoe

More information

SuperMap 系列产品介绍

SuperMap 系列产品介绍 wuzhihong@scu.edu.cn 3 / 1 / 16 / John M. Yarbrough: Digital Logic Applications and Design + + 30% 70% 1 CHAPTER 1 Digital Concepts and Number Systems 1.1 Digital and Analog: Basic Concepts P1 1.1 1.1

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 9 [P.11] : Dev C++ [P.12] : http://c.feis.tw [P.13] [P.14] [P.15] [P.17] [P.23] Dev C++ [P.24] [P.27] [P.34] C / C++ [P.35] 10 C / C++ C C++ C C++ C++ C ( ) C++

More information

02

02 Thinking in C++: Volume One: Introduction to Standard C++, Second Edition & Volume Two: Practical Programming C++ C C++ C++ 3 3 C C class C++ C++ C++ C++ string vector 2.1 interpreter compiler 2.1.1 BASIC

More information

C 1

C 1 C homepage: xpzhangme 2018 5 30 C 1 C min(x, y) double C // min c # include # include double min ( double x, double y); int main ( int argc, char * argv []) { double x, y; if( argc!=

More information

C/C++ 语言 - 循环

C/C++ 语言 - 循环 C/C++ Table of contents 7. 1. 2. while 3. 4. 5. for 6. 8. (do while) 9. 10. (nested loop) 11. 12. 13. 1 // summing.c: # include int main ( void ) { long num ; long sum = 0L; int status ; printf

More information

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

C/C++ - 字符输入输出和字符确认

C/C++ - 字符输入输出和字符确认 C/C++ Table of contents 1. 2. getchar() putchar() 3. (Buffer) 4. 5. 6. 7. 8. 1 2 3 1 // pseudo code 2 read a character 3 while there is more input 4 increment character count 5 if a line has been read,

More information

新版 明解C言語入門編

新版 明解C言語入門編 328, 4, 110, 189, 103, 11... 318. 274 6 ; 10 ; 5? 48 & & 228! 61!= 42 ^= 66 _ 82 /= 66 /* 3 / 19 ~ 164 OR 53 OR 164 = 66 ( ) 115 ( ) 31 ^ OR 164 [] 89, 241 [] 324 + + 4, 19, 241 + + 22 ++ 67 ++ 73 += 66

More information

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023)

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023) ( CIP) /. :, 2005. 2 ( ) ISBN 7-5624-3339-9.......... TP311. 1 CIP ( 2005) 011794 : : : : * : : 174 ( A ) :400030 : ( 023) 65102378 65105781 : ( 023) 65103686 65105565 : http: / /www. cqup. com. cn : fxk@cqup.

More information

Microsoft Word - CPE考生使用手冊160524.docx

Microsoft Word - CPE考生使用手冊160524.docx 大 學 程 式 能 力 檢 定 (CPE) 考 生 使 用 手 冊 2016 年 5 月 24 日 這 份 手 冊 提 供 給 參 加 CPE 檢 定 考 試 的 考 生 內 容 包 含 考 試 環 境 的 使 用, 以 及 解 題 時 所 使 用 I/O 的 基 本 知 識 1. 如 欲 報 名 參 加 CPE 考 試, 請 先 於 CPE 網 站 完 成 帳 號 註 冊, 然 後 再 報 名 該

More information

C

C C 2017 4 1 1. 2. while 3. 4. 5. for 6. 2/161 C 7. 8. (do while) 9. 10. (nested loop) 11. 12. 3/161 C 1. I 1 // summing.c: 2 #include 3 int main(void) 4 { 5 long num; 6 long sum = 0L; 7 int status;

More information

碩命題橫式

碩命題橫式 一 解釋名詞 :(50%) 1. Two s complement of an integer in binary 2. Arithmetic right shift of a signed integer 3. Pipelining in instruction execution 4. Highest and lowest layers in the TCP/IP protocol suite

More information

<4D F736F F F696E74202D20BCC6A6ECA874B2CEBEC9BDD7C1BFB871B2C4A440B3B9>

<4D F736F F F696E74202D20BCC6A6ECA874B2CEBEC9BDD7C1BFB871B2C4A440B3B9> 數位系統導論 蔡宗漢 (Tsung-Han Tsai) Dept. of E.E., N.C.U. 1 教學目標 : 1 了解數位電子電路的基本原理, 例如資訊的二進位系統 布林代數 2 了解數位電子電路的基本原件, 如 : 組合電路 循序電路 加法器 比較器 等等 授課大綱 : 1 數位邏輯的原理 2 元件的認識( 如 AND/OR 閘, 加法器 ) 3 數位邏輯功能單元 4 數位邏輯的設計 2

More information

C 1 # include <stdio.h> 2 int main ( void ) { 4 int cases, i; 5 long long a, b; 6 scanf ("%d", & cases ); 7 for (i = 0;i < cases ;i ++) 8 { 9

C 1 # include <stdio.h> 2 int main ( void ) { 4 int cases, i; 5 long long a, b; 6 scanf (%d, & cases ); 7 for (i = 0;i < cases ;i ++) 8 { 9 201 201 21 ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp Compilation Error long long cin scanf Time Limit Exceeded 1: A 1 B 1 C 5 D RPG 10 E 10 F 1 G II 1 1 201 201 C 1 # include 2 int main ( void

More information

c_cpp

c_cpp C C++ C C++ C++ (object oriented) C C++.cpp C C++ C C++ : for (int i=0;i

More information

春 天 来 了, 万 物 复 苏, 小 草 绿 了 小 河 解 冻 了 柳 树 发 芽 了 桃 花 盛 开 了 春 天 给 大 自 然 带 来 了 盎 然 生 机 春 天 的 景 物 是 美 丽 的, 春 天 的 故 事 是 动 人 的, 我 们 有 取 之 不 尽 的 以 春 为 主 题 的 作

春 天 来 了, 万 物 复 苏, 小 草 绿 了 小 河 解 冻 了 柳 树 发 芽 了 桃 花 盛 开 了 春 天 给 大 自 然 带 来 了 盎 然 生 机 春 天 的 景 物 是 美 丽 的, 春 天 的 故 事 是 动 人 的, 我 们 有 取 之 不 尽 的 以 春 为 主 题 的 作 主 编 寄 语 祝 你 在 作 文 世 界 展 翅 腾 飞 学 作 文, 必 须 从 读 别 人 的 好 作 文 开 始 中 国 旧 时 代 的 文 人 有 一 句 顺 口 溜 : 熟 读 唐 诗 三 百 首, 不 会 作 诗 也 会 诌 这 句 话 告 诉 我 们 : 写 作 必 须 从 阅 读 开 姑, 而 且 必 须 从 精 选 的 佳 作 开 始 进 入 新 世 纪 以 后, 在 新 课 标

More information

Microsoft PowerPoint - ds-1.ppt [兼容模式]

Microsoft PowerPoint - ds-1.ppt [兼容模式] http://jwc..edu.cn/jxgl/ HomePage/Default.asp 2 说 明 总 学 时 : 72( 学 时 )= 56( 课 时 )+ 16( 实 验 ) 行 课 时 间 : 第 1 ~14 周 周 学 时 : 平 均 每 周 4 学 时 上 机 安 排 待 定 考 试 时 间 : 课 程 束 第 8 11 12 章 的 内 容 为 自 学 内 容 ; 目 录 中 标 有

More information

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit 6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C51 6.1 C51 6.1.1 C51 C51 ANSI C MCS-51 C51 ANSI C C51 6.1 6.1 C51 bit Byte bit sbit 1 0 1 unsigned char 8 1 0 255 Signed char 8 11 128

More information

Microsoft Word - 09.數學136-281.docx

Microsoft Word - 09.數學136-281.docx 136. 計 算 梯 型 面 積 (1 分 ) 請 以 JAVA 運 算 式 計 算 下 面 梯 形 面 積, 並 輸 出 面 積 結 果 梯 形 面 積 公 式 為 :( 上 底 + 下 底 ) 高 2 每 一 組 依 序 分 別 輸 入 梯 形 的 上 底 下 底 及 高 的 整 數 輸 出 梯 形 面 積 輸 入 輸 出 94 190 120 99 54 47 137. 計 算 三 角 形 面

More information

CHAPTER 1

CHAPTER 1 CHAPTER 1 1-1 System Development Life Cycle; SDLC SDLC Waterfall Model Shelly 1995 1. Preliminary Investigation 2. System Analysis 3. System Design 4. System Development 5. System Implementation and Evaluation

More information

untitled

untitled 3 C++ 3.1 3.2 3.3 3.4 new delete 3.5 this 3.6 3.7 3.1 3.1 class struct union struct union C class C++ C++ 3.1 3.1 #include struct STRING { typedef char *CHARPTR; // CHARPTR s; // int strlen(

More information

Chapter 3

Chapter 3 Chapter 3 Arithmetic for Computers 陳瑞奇 (J.C. Chen) 亞洲大學資訊工程學系 Adapted from class notes by Prof. C.T. King, NTHU, Prof. M.J. Irwin, PSU and Prof. D. Patterson, UCB 3.2 Addition & Subtraction p.67 ( 頁 69)

More information

!49 第 二講 資料型態 運算子與表示式 講師 : 李根逸 (Ken-Yi Lee),

!49 第 二講 資料型態 運算子與表示式 講師 : 李根逸 (Ken-Yi Lee), !49 第 二講 資料型態 運算子與表示式 講師 : 李根逸 (Ken-Yi Lee), E-mail: feis.tw@gmail.com !50 課程 大綱 資料型態 [P.51] C/C++ 內建的常 見資料型態 [P.52] 使 用 sizeof 看 大 小 [P.53] 變數宣告 [P.54] 不同資料型態間的差異 [P.55] 整數 (short int, int, long int)

More information

Microsoft Word - 投影片ch03

Microsoft Word - 投影片ch03 Java2 JDK5.0 教學手冊第三版洪維恩編著博碩文化出版書號 pg20210 第三章變數與資料型態 本章學習目標認識變數與常數認識 Java 的基本資料型態學習如何進行資料型態轉換學習如何由鍵盤輸入資料 變數與資料型態 3-2 Java 的資料型態分為 : 與 原始資料型態 (primitive type) 非原始資料型態 (non-primitive type) 原始資料型態包括了整數與浮點數等型態

More information

<4D6963726F736F667420506F776572506F696E74202D20B5DAD2BBD5C228B4F2D3A1B0E6292E707074205BBCE6C8DDC4A3CABD5D>

<4D6963726F736F667420506F776572506F696E74202D20B5DAD2BBD5C228B4F2D3A1B0E6292E707074205BBCE6C8DDC4A3CABD5D> Homeworks ( 第 三 版 ):.4 (,, 3).5 (, 3).6. (, 3, 5). (, 4).4.6.7 (,3).9 (, 3, 5) Chapter. Number systems and codes 第 一 章. 数 制 与 编 码 . Overview 概 述 Information is of digital forms in a digital system, and

More information

untitled

untitled MODBUS 1 MODBUS...1 1...4 1.1...4 1.2...4 1.3...4 1.4... 2...5 2.1...5 2.2...5 3...6 3.1 OPENSERIAL...6 3.2 CLOSESERIAL...8 3.3 RDMULTIBIT...8 3.4 RDMULTIWORD...9 3.5 WRTONEBIT...11 3.6 WRTONEWORD...12

More information

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

新・解きながら学ぶC言語

新・解きながら学ぶC言語 330!... 67!=... 42 "... 215 " "... 6, 77, 222 #define... 114, 194 #include... 145 %... 21 %... 21 %%... 21 %f... 26 %ld... 162 %lf... 26 %lu... 162 %o... 180 %p... 248 %s... 223, 224 %u... 162 %x... 180

More information

The return of scanf The number of fields successfully converted and assigned int a =1, b =2, c =3; int n = scanf("%d %d %d", &a, &b, &c); printf("%d\n

The return of scanf The number of fields successfully converted and assigned int a =1, b =2, c =3; int n = scanf(%d %d %d, &a, &b, &c); printf(%d\n Introduction to Computer and Program Design Lesson 2 Functions, scanf and EOF James C.C. Cheng Department of Computer Science National Chiao Tung University The return of scanf The number of fields successfully

More information

科学计算的语言-FORTRAN95

科学计算的语言-FORTRAN95 科 学 计 算 的 语 言 -FORTRAN95 目 录 第 一 篇 闲 话 第 1 章 目 的 是 计 算 第 2 章 FORTRAN95 如 何 描 述 计 算 第 3 章 FORTRAN 的 编 译 系 统 第 二 篇 计 算 的 叙 述 第 4 章 FORTRAN95 语 言 的 形 貌 第 5 章 准 备 数 据 第 6 章 构 造 数 据 第 7 章 声 明 数 据 第 8 章 构 造

More information

untitled

untitled A, 3+A printf( ABCDEF ) 3+ printf( ABCDEF ) 2.1 C++ main main main) * ( ) ( ) [ ].* ->* ()[] [][] ** *& char (f)(int); ( ) (f) (f) f (int) f int char f char f(int) (f) char (*f)(int); (*f) (int) (

More information

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++;

int *p int a 0x00C7 0x00C7 0x00C int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; Memory & Pointer trio@seu.edu.cn 2.1 2.1.1 1 int *p int a 0x00C7 0x00C7 0x00C7 2.1.2 2 int I[2], *pi = &I[0]; pi++; char C[2], *pc = &C[0]; pc++; float F[2], *pf = &F[0]; pf++; 2.1.3 1. 2. 3. 3 int A,

More information

nooog

nooog C : : : , C C,,, C, C,, C ( ), ( ) C,,, ;,, ; C,,, ;, ;, ;, ;,,,, ;,,, ; : 1 9, 2 3, 4, 5, 6 10 11, 7 8, 12 13,,,,, 2008 1 1 (1 ) 1.1 (1 ) 1.1.1 ( ) 1.1.2 ( ) 1.1.3 ( ) 1.1.4 ( ) 1.1.5 ( ) 1.2 ( ) 1.2.1

More information

C C C The Most Beautiful Language and Most Dangerous Language in the Programming World! C 2 C C C 4 C 40 30 10 Project 30 C Project 3 60 Project 40

C C C The Most Beautiful Language and Most Dangerous Language in the Programming World! C 2 C C C 4 C 40 30 10 Project 30 C Project 3 60 Project 40 C C trio@seu.edu.cn C C C C The Most Beautiful Language and Most Dangerous Language in the Programming World! C 2 C C C 4 C 40 30 10 Project 30 C Project 3 60 Project 40 Week3 C Week5 Week5 Memory & Pointer

More information

Microsoft PowerPoint - STU_C_Lang_CH13.ppt

Microsoft PowerPoint - STU_C_Lang_CH13.ppt 第 13 章 動態配置記憶體 程式設計與生活 - 使用 C 語言 Shi-Huang Chen Spring 2013 第 13 章 動態配置記憶體 13-1 記憶體配置函式 malloc( ) 13-2 動態配置結構陣列 配置記憶體 預估需求數量的範圍是一項不容易的學問 例 : 大到預估今年國家預算, 小到預估櫥窗裡展示的毛線衣, 需要多少磅毛線才能織成 撰寫程式時, 一樣無法預估程式執行所需的記憶體空間

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

Microsoft Word - 最新正文.doc

Microsoft Word - 最新正文.doc 9 21 1.1.1 1.1.2 1 2 2 Windows 7+Office 2010 3 4 5 6 4 7 1.1.3 5 1.1.4 1 3 2 NII 1993 3 CNNIC 2014 1 16 33 1 2013 12 6.18 5358 45.8% 2012 3.7 2 2013 12 5 19.1% 2012 74.5% 81.0% 2013 3G 2013 12 2.47 2012

More information

Microsoft Word - temp71.doc

Microsoft Word - temp71.doc 泉 州 市 人 民 政 府 文 件 泉 政 文 2008 105 号 泉 州 市 人 民 政 府 关 于 印 发 关 于 开 展 落 实 企 事 业 单 位 安 全 生 产 主 体 责 任 三 年 行 动 方 案 的 通 知 各 县 ( 市 区 ) 人 民 政 府 泉 州 开 发 区 管 委 会, 市 直 有 关 单 位 : 现 将 关 于 开 展 落 实 企 事 业 单 位 安 全 生 产 主 体

More information

untitled

untitled 8086/8088 CIP /. 2004.8 ISBN 7-03-014239-X.... TP313 CIP 2004 086019 16 100717 http://www.sciencep.com * 2004 8 2004 8 1 5 500 787 1092 1/16 16 1/2 391 000 1 2 ii 1 2 CAI CAI 3 To the teacher To the student

More information

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor 1 4.1.1.1 (Load) 14 1.1 1 4.1.1.2 (Save) 14 1.1.1 1 4.1.2 (Buffer) 16 1.1.2 1 4.1.3 (Device) 16 1.1.3 1 4.1.3.1 (Select Device) 16 2 4.1.3.2 (Device Info) 16 2.1 2 4.1.3.3 (Adapter) 17 2.1.1 CD-ROM 2 4.1.4

More information

Ps22Pdf

Ps22Pdf C ( CIP) C /. :, 2001. 7 21 ISBN 7-5624 -2355-5. C........ C. TP312 CIP ( 2001 ) 034496 C * * : 7871092 1 /16 : 14. 25 : 356 20017 1 20017 1 : 1 6 000 ISBN 7-5624-2355-5 / TP311 : 21. 00 C, C,,,, C,, (

More information

(精校版)陕西省语文卷文档版(含答案)-2011年普通高等学校招生统一考试.doc

(精校版)陕西省语文卷文档版(含答案)-2011年普通高等学校招生统一考试.doc 语 文 试 题 一 古 代 诗 文 阅 读 (27 分 ) ( 一 ) 默 写 常 见 的 名 句 名 篇 (6 分 ) 1. 补 写 出 下 列 名 句 名 篇 中 的 空 缺 部 分 (6 分 ) (1) 入 则 无 法 家 拂 士,, 国 恒 亡 ( 孟 子 生 于 忧 患, 死 于 安 乐 ) (2) 师 者, ( 韩 愈 师 说 ) (3) 宁 溘 死 以 流 亡 兮, ( 屈 原 离 骚

More information

Excel VBA Excel Visual Basic for Application

Excel VBA  Excel Visual Basic for Application Excel VBA Jun5,00 Sub 分頁 () Dim i As Integer Dim Cname As String Dim Code As Variant Set score=thisworkbook.sheets("sheet") Code=Array(" 專北一 "," 專北二 "," 專北三 "," 專桃園 "," 專桃竹 "," 專中苗 ", " 專台中 "," 專台南 ","

More information

2/80 2

2/80 2 2/80 2 3/80 3 DSP2400 is a high performance Digital Signal Processor (DSP) designed and developed by author s laboratory. It is designed for multimedia and wireless application. To develop application

More information

新・明解C言語入門編『索引』

新・明解C言語入門編『索引』 !... 75!=... 48 "... 234 " "... 9, 84, 240 #define... 118, 213 #include... 148 %... 23 %... 23, 24 %%... 23 %d... 4 %f... 29 %ld... 177 %lf... 31 %lu... 177 %o... 196 %p... 262 %s... 242, 244 %u... 177

More information

Computer Architecture

Computer Architecture ECE 3120 Computer Systems Assembly Programming Manjeera Jeedigunta http://blogs.cae.tntech.edu/msjeedigun21 Email: msjeedigun21@tntech.edu Tel: 931-372-6181, Prescott Hall 120 Prev: Basic computer concepts

More information

LectureSlides1001 Data Storage.ppt [相容模式]

LectureSlides1001 Data Storage.ppt [相容模式] (continued) 1.6 Storing Integers 1.7 Storing Fractions 1.8 Data Compression 1.9 Communications Errors 1-3 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit

More information

/ / (FC 3)...

/ / (FC 3)... Modbus/TCP 1.0 1999 3 29 Andy Swales Schneider aswales@modicon.com ... 2 1.... 3 2.... 3 2.1.. 3 2.2..4 2.3..4 2.4... 5 3.... 5 3.1 0... 5 3.2 1... 5 3.3 2... 6 3.4 / /... 7 4.... 7 5.... 8 5.1 0... 9

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

Microsoft PowerPoint - CH02 Introduction to C++ Programming_輸入與輸出 [相容模式]

Microsoft PowerPoint - CH02 Introduction to C++ Programming_輸入與輸出 [相容模式] Ch2. Introduction to C++ Programming 輸入與輸出 標準 I/O 課程名稱 : 程式設計 Computer Programming 班級 : 資管一 Freshman, ISMS 任課教師 : 謝明哲 Hsieh, Ming-Che, Miller 單位職稱 : 台東大學資管系副教授 Associate Professor, ISMS, NTTU 電子郵件 :hmz@nttu.edu.tw

More information

z x / +/- < >< >< >< >< > 3 b10x b10x 0~9,a~f,A~F, 0~9,a~f,A~F, x,x,z,z,?,_ x,x,z,z,?,_ h H 0~9,_ 0~9,_ d D 0~7,x,X,z,Z

z x / +/- < >< >< >< >< > 3 b10x b10x 0~9,a~f,A~F, 0~9,a~f,A~F, x,x,z,z,?,_ x,x,z,z,?,_ h H 0~9,_ 0~9,_ d D 0~7,x,X,z,Z Verilog Verilog HDL HDL Verilog Verilog 1. 1. 1.1 1.1 TAB TAB VerilogHDL VerilogHDL C 1.2 1.2 C // // /* /* /* /* SYNOPSY SYNOPSY Design Compiler Design Compiler // //synopsys synopsys /* /*synopsys synopsys

More information

14. 阿 亮 在 寒 假 春 節 期 間 與 父 母 到 一 座 廟 裡 拜 拜, 廟 裡 的 神 有 掌 生 死 簿 的 判 官 勾 攝 生 魂 的 黑 白 無 常 執 行 拘 提 魂 魄 的 牛 頭 馬 面, 整 間 廟 看 起 來 有 些 陰 森, 請 問 阿 亮 到 了 哪 一 座 廟 內

14. 阿 亮 在 寒 假 春 節 期 間 與 父 母 到 一 座 廟 裡 拜 拜, 廟 裡 的 神 有 掌 生 死 簿 的 判 官 勾 攝 生 魂 的 黑 白 無 常 執 行 拘 提 魂 魄 的 牛 頭 馬 面, 整 間 廟 看 起 來 有 些 陰 森, 請 問 阿 亮 到 了 哪 一 座 廟 內 師 大 附 中 98 學 年 度 第 1 學 期 高 3 選 修 歷 史 上 第 1 類 組 第 二 次 期 中 考 一 單 選 題 ( 一 題 2 分 共 48 題 不 倒 扣 ) 1. 有 一 段 資 料 提 到 先 秦 某 一 家 的 學 說 : 有 支 持 泛 神 主 義 抒 情 主 義 和 無 政 府 主 義 的 趨 向 他 們 崇 信 宇 宙 間 的 一 元 組 織, 願 意 回 歸 到

More information

( 一 ) 全 面 贯 彻 党 和 国 家 的 教 育 方 针 政 策, 落 实 国 家 有 关 教 育 的 法 律 法 规 ; 研 究 草 拟 江 苏 省 教 育 法 规 和 政 策, 并 组 织 实 施 ( 二 ) 研 究 教 育 发 展 战 略 思 路, 统 筹 规 划 协 调 指 导 江 苏

( 一 ) 全 面 贯 彻 党 和 国 家 的 教 育 方 针 政 策, 落 实 国 家 有 关 教 育 的 法 律 法 规 ; 研 究 草 拟 江 苏 省 教 育 法 规 和 政 策, 并 组 织 实 施 ( 二 ) 研 究 教 育 发 展 战 略 思 路, 统 筹 规 划 协 调 指 导 江 苏 2008 年 江 苏 高 考 改 革 新 方 案 引 争 议 1. 案 例 概 述 1.1 案 例 简 介 2008 年 高 考 新 方 案 是 江 苏 省 10 年 内 的 第 五 套 高 考 方 案, 此 方 案 11 月 28 日 一 出 台 就 饱 受 争 议, 被 指 有 轻 理 化 的 嫌 疑 且 在 录 取 阶 段 出 现 了 录 取 准 则 不 明 确 的 现 象 针 对 此 现 象,

More information

untitled

untitled 說 參 例 邏 邏 1. 說 2. 數 數 3. 8 4. 理念 李 龍老 立 1. 理 料 2. 理 料 3. 數 料 4. 流 邏 念 5. 良 6. 讀 行 行 7. 行 例 來 邏 1. 說 說 識 量 2. 說 理 類 3. 數 數 念 4. 令 5. 良 6. 流 邏 念 7. 說 邏 理 力 1. 2. 3. 4. 5. 列 念 1 參 1. ( Visual Basic 例 ) (1)

More information

C++ 程式設計

C++ 程式設計 C C 料, 數, - 列 串 理 列 main 數串列 什 pointer) 數, 數, 數 數 省 不 不, 數 (1) 數, 不 數 * 料 * 數 int *int_ptr; char *ch_ptr; float *float_ptr; double *double_ptr; 數 (2) int i=3; int *ptr; ptr=&i; 1000 1012 ptr 數, 數 1004

More information

<4D6963726F736F667420576F7264202D20C1E3B5E3CFC2D4D8C4A3B0E52E646F63>

<4D6963726F736F667420576F7264202D20C1E3B5E3CFC2D4D8C4A3B0E52E646F63> 历 年 MBA MPAcc 联 考 数 学 真 题 及 答 案 详 解 (009-0) 009 年 月 MBA 联 考 数 学 真 题 及 答 案 详 解 一 问 题 求 解 ( 本 大 题 共 小 题, 每 小 题 分, 共 分 下 列 每 题 给 出 的 五 个 选 项 中, 只 有 一 项 是 符 合 试 题 要 求 的 请 在 答 题 卡... 上 将 所 有 选 项 的 字 母 涂 黑 ).

More information

CH01.indd

CH01.indd 3D ios Android Windows 10 App Apple icloud Google Wi-Fi 4G 1 ( 3D ) 2 3 4 5 CPU / / 2 6 App UNIX OS X Windows Linux (ios Android Windows 8/8.1/10 BlackBerry OS) 7 ( ZigBee UWB) (IEEE 802.11/a/b/g/n/ad/ac

More information

A. B. C. D. 2. A. B. C. D. 3. A. 4 N B. 18 N C. 40 N D N 1

A. B. C. D. 2. A. B. C. D. 3. A. 4 N B. 18 N C. 40 N D N 1 1 1 3 5 5 8 9 9 11 13 14 16 17 17 19 21 23 25 26 26 29 31 32 32 33 34 35 37 38 1 1. 2. 3. 1. 2. 3. 4. 5. 1 2 3 1. A. B. C. D. 2. A. B. C. D. 3. A. 4 N B. 18 N C. 40 N D. 23. 5 N 1 1 2 3 1. A. B. C. D.

More information

Microsoft Word - t0626.doc

Microsoft Word - t0626.doc 台 北 市 立 成 功 高 中 高 一 國 文 科 期 末 考 試 題 一 一 學 年 度 第 二 學 期 考 試 範 圍 : 三 民 版 課 本 ( 二 ):L9~L13 三 民 版 課 外 閱 讀 新 視 界 : 古 詩 選 鶯 鶯 傳 文 學 史 之 旅 : 第 46 至 50 天 在 答 案 卡 上 作 答, 答 案 卡 書 寫 班 級 座 號 姓 名 並 正 確 畫 記, 畫 記 錯 誤

More information

新・解きながら学ぶJava

新・解きながら学ぶJava 481! 41, 74!= 40, 270 " 4 % 23, 25 %% 121 %c 425 %d 121 %o 121 %x 121 & 199 && 48 ' 81, 425 ( ) 14, 17 ( ) 128 ( ) 183 * 23 */ 3, 390 ++ 79 ++ 80 += 93 + 22 + 23 + 279 + 14 + 124 + 7, 148, 16 -- 79 --

More information

VB.Net

VB.Net VB.NET 視窗程式設計基本語法 : 變數宣告 NTU CSIE 講師 : 張傑帆 VB.NET 基本語法 在學習視窗程式之前我們需要先熟悉一下 Visual Basic 的基本語法, 包括 : 變數 運算子 選擇性結構 重複結構 陣列 程序 及結構化例外處理等語法 這些語法是程式邏輯的基礎, 也是程式和電腦硬體溝通, 並指揮電腦內部運作的橋梁 電腦五大單元 識別字 (Identifier) 程式

More information

<4D F736F F D20B2C43032B3B920B8EAAEC6ABACBA41BB50AAEDA5DCA6A12E646F63>

<4D F736F F D20B2C43032B3B920B8EAAEC6ABACBA41BB50AAEDA5DCA6A12E646F63> C++ î Á 2-1! C Ã Ñ Ó 2-1.1! î ô à i¾ ò{î ~ à } Ñ lf ŠÈx«v ~ C ÃÑ lî nùƒ f d Û Ã ó ÎÛol ƒ à ó dîû Ê óãi Š~ v C v ÃÈxi á «constant Û Ù Ã ˆ ó nù d «12-452 100000 0 d 'A' 'Z' 8.23 0.1232 0.001 ŒÛ~ iñ C++ ó

More information

2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf ("%d", & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf ("%d %d

2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf (%d, & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf (%d %d 2013 18 ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp, Compilation Error cin scanf Time Limit Exceeded 1: A 5 B 5 C 5 D 5 E 5 F 5 1 2013 C 1 # include 2 int main ( void ) 3 { 4 int cases, a, b,

More information

並 責 成 各 里 幹 事 下 里 服 勤 宣 導 病 媒 防 治 知 識, 協 助 各 家 戶 清 除 病 媒 孳 生 源 ( 積 水 容 器 ), 降 低 棲 群 密 度, 預 防 傳 染 病 之 發 生, 以 確 保 民 眾 身 體 健 康 及 居 家 生 活 品 質 訂 定 每 月 最 後

並 責 成 各 里 幹 事 下 里 服 勤 宣 導 病 媒 防 治 知 識, 協 助 各 家 戶 清 除 病 媒 孳 生 源 ( 積 水 容 器 ), 降 低 棲 群 密 度, 預 防 傳 染 病 之 發 生, 以 確 保 民 眾 身 體 健 康 及 居 家 生 活 品 質 訂 定 每 月 最 後 541 94.4.6 臺 北 市 文 山 區 都 市 計 畫 案 通 盤 檢 討 主 要 計 畫 暨 細 部 計 畫 案 542 94.5.5 都 市 計 畫 道 路 用 地 變 更 為 可 發 展 用 地 免 予 回 饋 原 則 附 件 三 溫 泉 產 業 特 定 專 用 區 都 市 計 畫 案 召 集 人 本 案 案 情 複 雜, 且 為 求 審 議 效 益, 委 請 陳 委 員 武 正 擔 任

More information

1 LINUX IDE Emacs gcc gdb Emacs + gcc + gdb IDE Emacs IDE C Emacs Emacs IDE ICE Integrated Computing Environment Emacs Unix Linux Emacs Emacs Emacs Un

1 LINUX IDE Emacs gcc gdb Emacs + gcc + gdb IDE Emacs IDE C Emacs Emacs IDE ICE Integrated Computing Environment Emacs Unix Linux Emacs Emacs Emacs Un Linux C July 27, 2016 Contents 1 Linux IDE 1 2 GCC 3 2.1 hello.c hello.exe........................... 5 2.2............................... 9 2.2.1 -Wall................................ 9 2.2.2 -E..................................

More information

Ps22Pdf

Ps22Pdf : : : / : ISBN 7-5617 - 2033-8 / K 116 : 5. 00 : 2005 7 1 CIP ( 2005) 109076 , 123, 1976 10 6, 10 9 1015,,,,, : ; 2 3,, 3 10 15 17 1 16 1, 4,, 17 18,,,, 23, 3, 7 19 3 4 6 4. 5 20, 23, 24 1900, 3000 770.,

More information

Microsoft PowerPoint - lecture4--Signal Processing on DSPs.ppt

Microsoft PowerPoint - lecture4--Signal Processing on DSPs.ppt Signal Processing on DSP Platforms Lecture Outline Arithmetic Operations on C54x DSP Signal Processing on DSP Real-time Signal Processing on DSP * Please Refer to TMS320C54x Reference Set, Vol4: Applications

More information

C/C++ - 数组与指针

C/C++ - 数组与指针 C/C++ Table of contents 1. 2. 3. 4. 5. 6. 7. 8. 1 float candy [ 365]; char code [12]; int states [50]; 2 int array [6] = {1, 2, 4, 6, 8, 10}; 3 // day_mon1.c: # include # define MONTHS 12 int

More information

ebook15-2

ebook15-2 2 U N I X 2.1 U N I X C U N I X U N I X 80 U N I X ( ) U N I X 2.2 UNIX 2.2.1 ANSI C 1989 C A N S I X 3. 159-1989 ANSI 1989 ISO/IEC 9899:1990 A N S I ( I S O ) ANSI C C UN I X C ANSI 1989 4 Plauger 1992;Kernighan

More information

数据结构与算法 - Python基础

数据结构与算法 - Python基础 Python 教材及课件 课件及作业见网址 xpzhang.me 1 1. Python 2. 3. (list) (tuple) 4. (dict) (set) 5. 6. 7. 2 Python Python 3 Python 4 Python 1, 100, -8080, 0,... 0x 0-9, a-f 0 xff00, 0 xa432bf 5 1.24, 3.14, -9.80,...

More information

民國八十九年台灣地區在校學生性知識、態度與行為研究調查

民國八十九年台灣地區在校學生性知識、態度與行為研究調查 84 年 台 灣 地 區 在 校 學 生 性 知 識 態 度 與 行 為 研 究 調 查 過 錄 編 碼 簿 題 號 變 項 名 稱 變 項 說 明 選 項 數 值 說 明 備 註 i_no 學 生 編 號 問 卷 流 水 號 location 學 校 所 在 縣 市 編 號 1 台 北 市 2 基 隆 市 3 台 中 市 4 台 南 市 5 高 雄 市 6 新 竹 市 7 嘉 義 市 21 宜 蘭

More information

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2 Chapter 02 變數與運算式 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.2 2.2.1 2.2.2 2.2.3 type 2.2.4 2.3 2.3.1 print 2.3.2 input 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 + 2.4.6 Python Python 2.1 2.1.1 a p p l e b e a r c 65438790

More information

C/C++语言 - 分支结构

C/C++语言 - 分支结构 C/C++ Table of contents 1. if 2. if else 3. 4. 5. 6. continue break 7. switch 1 if if i // colddays.c: # include int main ( void ) { const int FREEZING = 0; float temperature ; int cold_ days

More information

目錄

目錄 資 訊 素 養 線 上 教 材 單 元 五 資 料 庫 概 論 及 Access 5.1 資 料 庫 概 論 5.1.1 為 什 麼 需 要 資 料 庫? 日 常 生 活 裡 我 們 常 常 需 要 記 錄 一 些 事 物, 以 便 有 朝 一 日 所 記 錄 的 事 物 能 夠 派 得 上 用 場 我 們 能 藉 由 記 錄 每 天 的 生 活 開 銷, 就 可 以 在 每 個 月 的 月 底 知

More information

C/C++ - 字符串与字符串函数

C/C++ - 字符串与字符串函数 C/C++ Table of contents 1. 2. 3. 4. 1 char C 2 char greeting [50] = " How " " are " " you?"; char greeting [50] = " How are you?"; 3 printf ("\" Ready, go!\" exclaimed John."); " Ready, go!" exclaimed

More information

untitled

untitled 2016 160 8 14 8:00 14:00 1 http://zj.sceea.cn www.sceea.cn APP 1 190 180 2 2 6 6 8 15 2016 2016 8 13 3 2016 2016 2016 0382 2 06 1 3300 14 1 3300 0451 5 01 2 7500 02 2 7500 05 ( ) 1 7500 1156 4 15 2 15000

More information

Strings

Strings Inheritance Cheng-Chin Chiang Relationships among Classes A 類 別 使 用 B 類 別 學 生 使 用 手 機 傳 遞 訊 息 公 司 使 用 金 庫 儲 存 重 要 文 件 人 類 使 用 交 通 工 具 旅 行 A 類 別 中 有 B 類 別 汽 車 有 輪 子 三 角 形 有 三 個 頂 點 電 腦 內 有 中 央 處 理 單 元 A

More information

《C语言程序设计》教材习题参考答案

《C语言程序设计》教材习题参考答案 教 材 名 称 : C 语 言 程 序 设 计 ( 第 1 版 ) 黄 保 和 江 弋 编 著 清 华 大 学 出 版 社 ISBN: 978-7-302-13599-9, 红 色 封 面 答 案 制 作 时 间 :2011 年 2 月 -5 月 一 思 考 题 1 常 量 和 变 量 有 什 么 区 别? 它 们 分 别 是 如 何 定 义 的? 常 量 是 指 在 C 程 序 运 行 过 程 中

More information

LEETCODE leetcode.com 一 个 在 线 编 程 网 站, 收 集 了 IT 公 司 的 面 试 题, 包 括 算 法, 数 据 库 和 shell 算 法 题 支 持 多 种 语 言, 包 括 C, C++, Java, Python 等 2015 年 3 月 份 加 入 了 R

LEETCODE leetcode.com 一 个 在 线 编 程 网 站, 收 集 了 IT 公 司 的 面 试 题, 包 括 算 法, 数 据 库 和 shell 算 法 题 支 持 多 种 语 言, 包 括 C, C++, Java, Python 等 2015 年 3 月 份 加 入 了 R 用 RUBY 解 LEETCODE 算 法 题 RUBY CONF CHINA 2015 By @quakewang LEETCODE leetcode.com 一 个 在 线 编 程 网 站, 收 集 了 IT 公 司 的 面 试 题, 包 括 算 法, 数 据 库 和 shell 算 法 题 支 持 多 种 语 言, 包 括 C, C++, Java, Python 等 2015 年 3 月 份

More information

Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice

Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice 路 ESW 聯 USB Chapter 9 Applications For Windows Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice USB I/O USB / USB 3 料 2 1 3 路 USB / 列 料 料 料 LED

More information