A.doc

Size: px
Start display at page:

Download "A.doc"

Transcription

1 A CopyRight: 2003, Mahler Works C << >> 1.1 C (5 min) 1.1.1C ANSIAmerican National Standards InsituteISO International Standards Organzation 1.1.3C/C++C C C JAVA PLATFORM C 1.2 (5 min) (5 min) 1.3.1Input Device 1.3.2Output Device 1.3.3Memory Unit 1.3.4Arithmetic Unit 1.3.5Central processing Unit (CPU) 1.3.6Secondary storage Unit 1.4 (5 min) 1.4.1Machine Language Assembly Language ADD AX,2 MOV dx,ax 1.4.3High-level Language 1 44

2 Ex1.4 DOS DEBUG a 100 add ax,2 ENTER u100 Q 1.5 C (5 min) 1.5.1C.cpp ;.cxx ;.c 1.5.2C C Editor DISK Preprocessor DISK Compiler DISK Linker DISK Loader Primary Memory CPU Primary Memory 1.6 Microsoft Visual C++ (5 min) MS VC (15~30 min) //Prg : prg1.7.1.cpp // int main() cout << I love u all baby!! ; return 0; // // int main() int MAIN 1.7.3cout \n \t 2 44

3 \r \a \\ \ (15~30 min) //Prg : prg1.8.1.cpp // int main() cout << ; return 0; // cin (Memory Concept)(5~30 min) (Arithmetic)(5~30min) C C + F+7 F p-c P c * Bm B * m / X/y X / y % R mod s R % s ( ) *, /, % 3 44

4 +, y = ax + b y = a * x + b 1.11 (Equality and Relational Operator)(5~30min) C == X==Y X Y!= X!=Y X Y > > X > Y X Y < < X < Y X Y >= X >= Y X Y <= X <= Y X Y if //Prg : prg cpp // int main() int x,y; cout << Input X: ; cin >> x; cout << Input Y ; cin >> y; if (x>y) cout << First is BIG ; if(x<y) cout << Second is BIG ; return 0; //

5 5 44

6 2.1 if/else (20 min) if/else if else //Prg : prg2_1_1 //if / else int grad; cout << ; cin >> grad ; if (grad >=60) cout << ; else cout << ; 2.2 (20 min) if 90 A else if 80 B else if 70 C else if 60 D else 2.3 while (20 min) 2.3.1while while int product = 2; 6 44

7 while ( product <= 1000 ) product = product + 1 ; WHILE * 1 = 2 2 * 2 = * 9 =

8 3.1 (20~40 min) = C += 7 C = C + 7 -= D -= 4 D = D 4 *= E *= 5 E = E * 5 /= F /= 3 F = F / 3 %= G %=9 G = G % / ++ A++ A = A A A = A B-- B = B B B = B 1 //Prg : prg3_1_2.cpp //++ int main() int c ; c = 5 ; cout << c << endl ; cout << c++ << endl ; cout << c << endl << endl ; c = 5 ; cout << c<< endl; cout << ++c << endl ; cout << c << endl ; return 0; // (10~20 min) (int counter;) 2. (counter = 1;) 3. (++counter;) 4. while (counter <= 10) 8 44

9 //Prg : prg3_2_1.cpp // int main() int counter ; counter = 1; while (counter <= 10) cout << counter << endl ; ++counter; return 0; //

10 4.1for (20~60 min) 4.1.1for for (expression1; expression2; expression3) statement expression1 while (expression2) statement expression for //Prg : prg4_1_1.cpp // FOR int main() for (int counter = 1 ; counter <=10 ; counter++ ) cout << counter << endl ; return 0; // for (20~60 min) 4.2.0FOR for( int number = 2; // number <= 100 ; // sum += numbner, number += 2) // for(int i = 1; i <= 100 ; i++) for(int i = 100; i >= 1 ; i--) FOR ,5,8,11,14,17, ,88,77,66,55,44,33,22,11,0 4.3switch (20~60 min) 4.3.1switch switch ( ) case 1 break; case

11 break; 4.3.2switch if/else 90 A80 B.. 4.4do/while (20~60 min) while while( condition) 4.4.2do / while do statement while(condition); do statement while (condition); //Prg : prg4_2_2.cpp //do/while int main() int counter = 1; do cout << counter << ; counter ++ ; while (counter <= 10) ; cout << endl ; return 0 ; AND if 20 if age >= 20 && sex = 1 ; OR 11 44

12 if age >= 20 or age <=

13 5.1 5min 5.2 (5~10 min) math.h ceil( x ) ceil( 9.2 ) is 10.0 cos( x ) Cosine cos( 0.0 ) is 1.0 exp( x ) e exp( 1.0 ) = pow( x, y ) X pow( 2, 3 ) is (10~30min) //Prg : prg5_3_1.cpp // int square( int ) ; // int main() for ( i = 1 ; i <= 10 ; i ++) cout << square ( i ) << \t ; cout << endl ; return 0; // 0 int square( int y) return y * y ; int square( int ) ; int square () int return-value-type function-name( parameter-list) declarations and statements 13 44

14 5.3.4return return expression; 5.4 a,b,c C

15 C++ long double double float unsigned long int long int unsigned int int unsigned short int short int unsigned char char 6.2 (Header File) (Random Number Generation) i = rand() ; rand() stdlib.h rand() Rand //Prg : prg6_3_3.cpp // #include <stdlib.h> int main() for(int i = 1; i <= 20 ; i ++) cout << (1 + rand() % 6) << \t ; if ( i % 5 == 0 ) cout << endl ; // 15 44

16 return 0; // srand() srand( x ), x unsigned int //Prg : prg6_3_5.cpp // #include <stdlib.h> int main() unsigned seed ; cout << ; cin >> seed ; srand ( seed ) ; for(int i = 1; i <= 20 ; i ++) cout << (1 + rand() % 6) << \t ; if ( i % 5 == 0 ) cout << endl ; // return 0; // C

17 7.1 overloading C C C C int add_values(int a, int b) return (a + b) ; int add_values(int a, int b,int c) return ( a + b + c) ; cout << = << add_values(200,100) << endl; cout << = << add_values(200,100, 2) << endl; 7.2 Recursion (Recursion) n * ( n-1 ) * (n-2). * 1 n! FOR n n! 7.2.4(Recusion) N unsigned long n( unsigned long) 17 44

18 for (int i=1 ; i <=10 ; i++) cout << \t << i <<! = << n(i) << endl ; unsigned long n( unsigned long i) if (i<=1) return 1 ; else return i * n(i 1) 7.3 (call by value, or, call by refrerence) (call by value) int add_value(int a, int b) return (a + b) ; int x, y ; x = 2, y = 3; cout << add_value(x,y) << endl ; cout << x << endl; cout << y << endl; Add_valuec MAIN x,y VALUE add_value AB CALL BY VALUE MAIN XY (call by reference) void add_value(int &a, int &b) a = (a + b) ; int x, y ; x = 2, y = 3; add_value(x,y) ; cout << x << endl; cout << y << endl; X C DEFAULT 18 44

19 void show(int a=1, int b=2, int c=3) cout << a << a << b << b << c << c << endl; show(); show(1001); show(1001,2002); show(1001;2002;3003); 19 44

20 C[0] 2 C[1] 3 C[2] 0 C[3] -123 C[4] 3 C[5] 1310 C[6] 41 C[7] 23 C[8] 54 C[9] 467 C[10] cout << c[0] << c[1] << c[10] ; x = x[3] / 10; int b[10] ; int x[9], y[9] ; int a, n[10] ; for (a = 0; a< 10 ; a++) n[a] = a ; cout << Elements Value ; for (a=0 ; a<10 ; a++) cout << a << \t << n[a] << endl; FOR int n[10] = 32, 26, 54, 12, 23, 44, 56, 78, 77, 88; 20 44

21 for (int j=0 ; j<10 ; j++) cout << no. << j << is << n[j] << endl ; 8.3constant varible const int x = 7 ; cout << const variables x is : << x ; const int x ; x=7; cout << const variables x is : << x ; const int arraysize = 12 ; int a [ arraysize ] = 1, 3, 5, 7, 4, 12, 24, 44, 54, 53, 98, 12; int total = 0 ; for (int k=0; k< arraysize; k++) total += a [ k] ; cout << The sum is: << total ; const int responsesize = 40, frequencysize = 11; int responses[ responsesize ] 21 44

22 = 1, 2, 6, 4, 8, 5, 9, 7, 8,10, 1, 6, 3, 8, 6,10, 3, 8, 2, 7, 6, 5, 7, 6, 8, 6, 7, 5, 6, 6, 5, 6, 7, 5, 6, 4, 8, 6, 8,10; int frequency[ frequencysize ] = 0 ; for (int answer = 0; answer < responsesize ; answer++) ++frequency[ responses[ answer ] ]; cout << "Rating" << "\t" << "Frequency" << endl; for (int rate=1 ; rate <frequencysize ; rate++) cout << rate << "\t" << frequency[rate] << endl; 22 44

23 10.1 const int arraysize = 10 ; int a [ arraysize ] = 2,6, 4, 8, 10, 12, 89, 68, 45, 37 ; int i, hold ; cout << " \n"; for (i=0 ; i<arraysize; i++) cout << " " << a [ i ] ; for (int pass = 0 ; pass < arraysize - 1; pass++) for (i=0 ; i<arraysize ; i++) if ( a[i] > a[i+1] ) hold = a[i] ; a[i] = a[i+1]; a[i+1] = hold ; cout << "\n \n"; for (i=0 ; i<arraysize; i++) cout << " " << a [ i ] ; 23 44

24 10.2 C MEAN MEDIAN MODE C 24 44

25 25 44

26 10.3 (linear Search) CUSTOM Linear Search C int linearsearch( const int array[], int key, int sizeofarray ); const int arraysize = 100; int a[ arraysize ], searchkey, element; for(int x=0; x<arraysize; x++) a[x] = 2 * x; cout << " (Search Key" ; cin >> searchkey ; element = linearsearch( a, searchkey, arraysize ) ; if( element!= -1 ) cout << " :" << element << endl ; else cout << " " << endl ; int linearsearch( const int array[], int key, int sizeofarray ) for(int n=0; n<sizeofarray; n++) if( array[n] == key ) 26 44

27 return n ; return -1 ; 10.4 Colum0 Colum1 Colum2 Column3 Row0 A[0][0] A[0][1] A[0][2] A[0][3] Row1 A[1][0] A[1][1] A[1][2] A[1][3] Row2 A[2][0] A[2][1] A[2][2] A[2][3] void printmarray(int a[][3]); int array1[2][3] = 1,2,3,4,5,6, array2[2][3] = 1,2,3,4,5,6, array3[2][3] = 1,2,4; cout << " array1 " << endl ; printmarray( array1 ); cout << " array2 " << endl ; printmarray( array2 ); cout << " array3 " << endl ; printmarray( array3 ); void printmarray(int a[][3]) for(int i=0;i<2;i++) for(int j=0;j<3;j++) cout << a[i][j] << ' ' ; cout << endl; 27 44

28 11.0 #include <string.h> char x[] = "Happy Birthday to You" ; char y[25], z[15]; cout << "The string in array x is:" << x << "\nthe string in array y is:" << strcpy(y,x) << '\n' ; strncpy(z,x,14); // NULL z[14] = NULL; cout << "The String in array z is: " << z << endl ; 11.1 C int *countptr, count; int Float *xptr, *ypter; 28 44

29 11.2 Int y =5; Int *yptr; yptr = &y ; y yptr int a; //a int *aptr; //aptr a=7; aptr = &a; //a aptr cout << "a " << &a ; cout << "\naptr " << aptr; cout << "\n\na " << a ; cout << "\n*aptr " << aptr; cout<< "\n\n " << "\n&*aptr = " << &*aptr << "\n*&aptr = " << *&aptr << endl ; 29 44

30 11.3 (Call-By-Reference) void bubblesortr(int *array, const int size); const int arraysize = 10; int a[ arraysize ] = 2, 6, 4, 8, 10, 12, 89, 68, 45, 37 ; int i; cout << "Data Item in origrinal order\n" ; for(i=0;i<arraysize;i++) cout << " " << a[i] ; bubblesortr(a, arraysize); cout << "\ndata items in ascending order\n" ; for(i=0;i<arraysize;i++) cout << " " << a[i] ; cout << endl ; void bubblesortr(int *array, const int size) void swap(int *,int *); for(int pass=0;pass<size-1;pass++) for(int j=0;j<size-1;j++) if(array[j] > array[j+1]) swap(&array[j],&array[j+1]); void swap(int *element1ptr, int *element2ptr) int hold = *element1ptr; *element1ptr = *element2ptr; *element2ptr = hold; 30 44

31 11.4 suit[0] = H e a r t s \0 suit[1] = D i a m o n d s \0 suit[2] = C l u b s \0 suit[3] = S p a d e s \0 Heart 0 Diamonds 1 Clubs 2 Spades 3 Ace Two Three Four Five Six Seven Eight Night ten Jack Queen King Deck[2][12] CLUB KING Club King deck DECK suit face suit[row]face[column] 2 9 suit face deck deck ^_^ 31 44

32 32 44

33 12.1 struct ; ; ; struct Time int hour; int minute; int second; ; void printstandard( const Time &t ); void printmilitary( const Time &t ); Time dinnertime; // TIME dinnertime dinnertime.hour = 18; // dinnertime.minute = 30; dinnertime.second = 0; cout << "The dinner will br held at "; printmilitary( dinnertime ); cout << "mlitary time, \nwhich is "; printstandard( dinnertime ); cout << "standard time.\n"; // dinnertime dinnertime.hour = 29; dinnertime.minute = 73; cout << "\ntime with invalid values: " ; printmilitary( dinnertime ); cout << endl ; void printmilitary( const Time &t ) cout << ( t.hour < 10? "0" : "") << t.hour << ":" << ( t.minute < 10? "0" : "") << t.minute ; 33 44

34 void printstandard( const Time &t ) cout << ((t.hour == 0 t.hour == 12 )? 12 : t.hour % 12 ) << ":" << (t.minute < 10? "0" : "" ) << t.minute << ":" << (t.second < 10? "0" : "" ) << t.second << (t.hour < 12? "AM" : "PM" ) ; 12.2 CLASS class struct CLASS STRUCT CLASS STRUCT class TimeClass public: TimeClass(); void settime(int,int,int); void printmilitary(); void printstandard(); private: int hour; int minute; int second; ; CLASS PUBLIC C PRIVATE CLASS CONTRUCTOR CLASS class STUDENT // STUDENT public: int no; int age; ; STUDENT curtis; cout << " "; cin >> curtis.no ; 34 44

35 cout << " " ; cin >> curtis.age ; cout << curtis.no << endl << curtis.age ; globale function & member function C CLASS STRUCT MEMBER FUNCTION class STUDENT // STUDENT public: void print(); int no; int age; ; // PRINT void STUDENT::print() cout << "[" << no << "," << age << "]" << endl ; STUDENT curtis; cout << " "; cin >> curtis.no ; cout << " " ; cin >> curtis.age ; curtis.print(); // 35 44

36 12.2.3public private PUBLIC PUBLIC PRIVATE PUBLIC MEMBER FUNCTION class STUDENT // STUDENT public: void print(); void input(int,int); private: int no; int age; ; // PRINT void STUDENT::print() cout << "[" << no << "," << age << "]" << endl ; // // no age PRIVATE // MEMBER void STUDENT::input(int i_no, int i_age) no = i_no; age = i_age; STUDENT curtis; int age,no ; cout << " "; cin >> no ; cout << " " ; cin >> age ; curtis.input(no, age); curtis.print(); // input // print 36 44

37 12.2.4constructor constructor constructor 0 contructor class STUDENT // STUDENT public: STUDENT(); // constructor void print(); void input(int,int); private: int no; int age; ; // // //private STUDENT::STUDENT() no = 0; age = 0; // PRINT void STUDENT::print() cout << "[" << no << "," << age << "]" << endl ; // // no age PRIVATE // MEMBER void STUDENT::input(int i_no, int i_age) no = i_no; age = i_age; STUDENT curtis; int age,no ; 37 44

38 cout << " "; curtis.print(); cout << " "; cin >> no ; cout << " " ; cin >> age ; curtis.input(no, age); curtis.print(); // input // print 12.3 CLASS CLASS class TimeClass public: TimeClass(); void settime(int, int, int); void printmilitary(); void printstandard(); private: int hour; int minute; int second; ; TimeClass::TimeClass() hour=minute=second=0; void TimeClass::setTime(int h,int m,int s) hour = (( h>=0 && h<24)? h : 0); minute = ( m>=0 && m< 60 )? m : 0; second = ( s>=0 && s< 60 )? s : 0; void TimeClass::printMilitary() cout << ( hour < 10? "0" : "") << hour << ":" << ( minute < 10? "0" : "") << minute ; void TimeClass::printStandard() cout << ((hour == 0 hour == 12 )? 12 : hour % 12 ) << ":" << (minute < 10? "0" : "" ) << minute 38 44

39 << ":" << (second < 10? "0" : "" ) << second << (hour < 12? "AM" : "PM" ) ; TimeClass t; // t cout << "The initial militay time is: "; t.printmilitary(); cout << "\nthe initial standard time is: "; t.printstandard(); t.settime(13,27,6); cout << "\n\nthe militay time after set is: "; t.printmilitary(); cout << "\nthe standard time after set is: "; t.printstandard(); t.settime(99,99,99); cout << "\n\nthe militay time after invalid set is: "; t.printmilitary(); cout << "\nthe standard time after invalid set is: "; t.printstandard(); cout << endl ; 12.4CLASS CLASS GOOD private no price quan 1. constructor 2. input no,quan,price 3. print 4. cal

40 13.1CONSTCONSTANT MEMBER FUNCTION OBJECT C const Time noon(12,0,0); TIME NOON C CONST #include "time5.h" // Time::Time(int hr,int min,int sec)settime(hr,min,sec); void Time::setTime(int h,int m,int s) sethour(h); setminute(m); setsecond(s); void Time::setHour(int h) hour = ( (h>=0 && h<=24)? h:0 ); void Time::setMinute(int m) minute = ( (m>=0 && m<60)? m:0); void Time::setSecond(int s) second = ( (s>=0 && s<60)? s:0); int Time::getHour() const return hour; int Time::getMinute() const return minute; int Time::getSecond() const return second; void Time::printMilitary() const cout << ( hour < 10? "0" : "") << hour << ":" << ( minute < 10? "0" : "") << minute ; void Time::printStandatd() 40 44

41 cout << ( (hour == 12)? 12: hour % 12) << ":" << ( minute < 10? "0" : "") << minute << ":" << ( second < 10? "0" : "") << second << ":" << ( hour < 12? "AM" : "PM" ); // Time wakeup(6,45,0); const Time noon(12, 0, 0); //non-constant object //constant object //Member Function Object wakeup.sethour(18); //non-const non-const noon.sethour(12); //non-const const wakeup.gethour(); //const non-const noon.getminute(); //const const noon.printmilitary(); //const const noon.printstandatd(); //non-const const Compiling... paper13_1.cpp D:\C++\taiwan\test_for_paper13\paper13_1.cpp(52) : error C2662: 'sethour' : cannot convert 'this' pointer from 'const class Time' to 'class Time &' Conversion loses qualifiers D:\C++\taiwan\test_for_paper13\paper13_1.cpp(58) : error C2662: 'printstandatd' : cannot convert 'this' pointer from 'const class Time' to 'class Time &' Conversion loses qualifiers Error executing cl.exe. test_for_paper13.exe - 2 error(s), 0 warning(s) noon.sethour CONST sethour NON-CONST noon.printstandard() CONST CONST MEMBER FUNCTION 41 44

42 13.2 (operator overloading) #include <string.h> class string public: string(char *); //Constructor void str_append(char *); void chr_minus(char); void show_string(void); private: char data[256]; ; string::string(char *str) strcpy(data,str); void string::str_append(char *str) strcat(data,str); void string::chr_minus(char letter) char temp[256]; int i,j; for(i=0,j=0;data[i];i++) if(data[i]!= letter) temp[j++] = data[i]; temp[j] = NULL; strcpy(data,temp); void string::show_string() cout << data << endl ; 42 44

43 string title("rescued By C++"); string lesson("understanding Operator Overloading"); title.show_string(); title.str_append(" rescued me!"); title.show_string(); lesson.show_string(); lesson.chr_minus('n'); lesson.show_string(); #include <string.h> class string public: string(char *); //Constructor void operator +(char *); void operator -(char); void show_string(void); private: char data[256]; ; string::string(char *str) strcpy(data,str); void string::operator +(char *str) strcat(data,str); void string::operator -(char letter) char temp[256]; int i,j; for(i=0,j=0;data[i];i++) if(data[i]!= letter) temp[j++] = data[i]; temp[j] = NULL; strcpy(data,temp); void string::show_string() cout << data << endl ; 43 44

44 string title("rescued By C++"); string lesson("understanding Operator Overloading"); title.show_string(); title + " rescued me!"; title.show_string(); lesson.show_string(); lesson - 'n'; lesson.show_string(); 13.3 struct XY void setvalue(int,int); ; int x; int y; void XY::setValue(int a,int b) x=a; y=b; ostream &operator <<(ostream &ooo,const XY &t) ooo << "[" << t.x << "," << t.y << "]" << endl ; return ooo ; XY test1; test1.setvalue(1,1); cout << test1; 44 44

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

FY.DOC

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

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

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++入門編 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

Microsoft Word - ch04三校.doc

Microsoft Word - ch04三校.doc 4-1 4-1-1 (Object) (State) (Behavior) ( ) ( ) ( method) ( properties) ( functions) 4-2 4-1-2 (Message) ( ) ( ) ( ) A B A ( ) ( ) ( YourCar) ( changegear) ( lowergear) 4-1-3 (Class) (Blueprint) 4-3 changegear

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

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

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

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

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

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

Chapter12 Derived Classes

Chapter12   Derived Classes 继 承 -- 派 生 类 复 习 1. 有 下 面 类 的 说 明, 有 错 误 的 语 句 是 : class X { A) const int a; B) X(); C) X(int val) {a=2 D) ~X(); 答 案 :C 不 正 确, 应 改 成 X(int val) : a(2) { 2. 下 列 静 态 数 据 成 员 的 特 性 中, 错 误 的 是 A) 说 明 静 态 数

More information

Microsoft Word - 97.01.30軟體設計第二部份範例試題_C++_ _1_.doc

Microsoft Word - 97.01.30軟體設計第二部份範例試題_C++_ _1_.doc 電 腦 軟 體 設 計 乙 級 技 術 士 技 能 檢 定 術 科 測 試 範 例 試 題 (C++) 試 題 編 號 :11900-920201-4 審 定 日 期 : 94 年 7 月 1 日 修 訂 日 期 : 96 年 2 月 1 日 97 年 1 月 30 日 ( 第 二 部 份 ) 電 腦 軟 體 設 計 乙 級 技 術 士 技 能 檢 定 術 科 測 試 應 檢 參 考 資 料 壹 試

More information

C语言的应用.PDF

C语言的应用.PDF AVR C 9 1 AVR C IAR C, *.HEX, C,,! C, > 9.1 AVR C MCU,, AVR?! IAR AVR / IAR 32 ALU 1KBytes - 8MBytes (SPM ) 16 MBytes C C *var1, *var2; *var1++ = *--var2; AVR C 9 2 LD R16,-X ST Z+,R16 Auto (local

More information

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

untitled

untitled 1 7 7.1 7.2 7.3 7.4 7.5 2 7.1 VFT virtual 7.1 3 1 1. 2. public protected public 3. VFT 4. this const volatile 4 2 5. ( ) ( ) 7.1 6. no-static virtual 7.2 7. inline 7.3 5 3 8. this this 9. ( ) ( ) delete

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

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

1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10

1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 Java V1.0.1 2007 4 10 1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 6.2.10 6.3..10 6.4 11 7.12 7.1

More information

四川省普通高等学校

四川省普通高等学校 四 川 省 普 通 高 等 学 校 计 算 机 应 用 知 识 和 能 力 等 级 考 试 考 试 大 纲 (2013 年 试 行 版 ) 四 川 省 教 育 厅 计 算 机 等 级 考 试 中 心 2013 年 1 月 目 录 一 级 考 试 大 纲 1 二 级 考 试 大 纲 6 程 序 设 计 公 共 基 础 知 识 6 BASIC 语 言 程 序 设 计 (Visual Basic) 9

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

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

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

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

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

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

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

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

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

Microsoft Word - 970617cppFinalSolution.doc

Microsoft Word - 970617cppFinalSolution.doc 國 立 台 灣 海 洋 大 學 資 訊 工 程 系 C++ 程 式 設 計 期 末 考 參 考 答 案 姓 名 : 系 級 : 學 號 : 97/06/17 考 試 時 間 :10:00 12:10 試 題 敘 述 蠻 多 的, 看 清 楚 題 目 問 什 麼, 針 對 重 點 回 答 是 很 重 要 的 ; 不 確 定 的 請 一 定 要 當 場 提 出 來, 不 要 白 花 力 氣 在 誤 會

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

ebook39-5

ebook39-5 5 3 last-in-first-out, LIFO 3-1 L i n e a r L i s t 3-8 C h a i n 3 3. 8. 3 C + + 5.1 [ ] s t a c k t o p b o t t o m 5-1a 5-1a E D 5-1b 5-1b E E 5-1a 5-1b 5-1c E t o p D t o p D C C B B B t o p A b o

More information

epub 33-8

epub 33-8 8 1) 2) 3) A S C I I 4 C I / O I / 8.1 8.1.1 1. ANSI C F I L E s t d i o. h typedef struct i n t _ f d ; i n t _ c l e f t ; i n t _ m o d e ; c h a r *_ n e x t ; char *_buff; /* /* /* /* /* 1 5 4 C FILE

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 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

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

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 177 [P179] (1) - [P181] [P182] (2) - for [P183] (3) - switch [P184] [P187] [P189] [P194] 178 [ ]; : : int var; : int var[3]; var 2293620 var[0] var[1] 2293620

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

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM CHAPTER 6 SQL SQL SQL 6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM 3. 1986 10 ANSI SQL ANSI X3. 135-1986

More information

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha

C PICC C++ C++ C C #include<pic.h> C static volatile unsigned char 0x01; static volatile unsigned char 0x02; static volatile unsigned cha CYPOK CYPOK 1 UltraEdit Project-->Install Language Tool: Language Suite----->hi-tech picc Tool Name ---->PICC Compiler Executable ---->c:hi-picinpicc.exe ( Command-line Project-->New Project-->File Name--->myc

More information

untitled

untitled 1 Outline 流 ( ) 流 ( ) 流 ( ) 流 ( ) 流 ( ) 狀 流 ( ) 利 來 行流 if () 立 行 ; else 不 立 行 ; 例 sample2-a1 (1) 列 // 料 Console.Write(""); string name = Console.ReadLine(); Console.WriteLine(" " + name + "!!"); 例 sample2-a1

More information

全国计算机技术与软件专业技术资格(水平)考试

全国计算机技术与软件专业技术资格(水平)考试 全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 ) 考 试 2008 年 上 半 年 程 序 员 下 午 试 卷 ( 考 试 时 间 14:00~16:30 共 150 分 钟 ) 试 题 一 ( 共 15 分 ) 阅 读 以 下 说 明 和 流 程 图, 填 补 流 程 图 中 的 空 缺 (1)~(9), 将 解 答 填 入 答 题 纸 的 对 应 栏 内 [ 说 明

More information

Microsoft PowerPoint - string_kruse [兼容模式]

Microsoft PowerPoint - string_kruse [兼容模式] Strings Strings in C not encapsulated Every C-string has type char *. Hence, a C-string references an address in memory, the first of a contiguous set of bytes that store the characters making up the string.

More information

Strings

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

More information

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO Car DVD New GUI IR Flow User Manual V0.1 Jan 25, 2008 19, Innovation First Road Science Park Hsin-Chu Taiwan 300 R.O.C. Tel: 886-3-578-6005 Fax: 886-3-578-4418 Web: www.sunplus.com Important Notice SUNPLUS

More information

2.1 n ~á CPU q ˆ ~ µƒã î ˆ C++ à nù eô 1. (edit) 2. Í (preprocess) 3. (compile) 4. (link) 5. (load) 6. ˆ (execute) µl ô Ãs nù (editor) Í (preprocessor

2.1 n ~á CPU q ˆ ~ µƒã î ˆ C++ à nù eô 1. (edit) 2. Í (preprocess) 3. (compile) 4. (link) 5. (load) 6. ˆ (execute) µl ô Ãs nù (editor) Í (preprocessor 2 C H A P T E R C++ «i o r o r r y r e «ˆ Û Ã ¾É t v ô Ãd C++ à t «È ÄÕx v C++ ÃÊh 2.1! t 2.2! ô à C++ 2.3! Borland C++ ê «v 2.4! Visual C++.NET 2.5! ô C++ 2.6! C++ m à Π2.7! t ð 2.8! t 2.1 n ~á CPU

More information

第3章.doc

第3章.doc 3 3 3 3.1 3 IT Trend C++ Java SAP Advantech ERPCRM C++ C++ Synopsys C++ NEC C C++PHP C++Java C++Java VIA C++ 3COM C++ SPSS C++ Sybase C++LinuxUNIX Motorola C++ IBM C++Java Oracle Java HP C++ C++ Yahoo

More information

untitled

untitled 1 1.1 1.2 1.3 1.4 1.5 ++ 1.6 ++ 2 BNF 3 4 5 6 7 8 1.2 9 1.2 IF ELSE 10 1.2 11 1.2 12 1.3 Ada, Modula-2 Simula Smalltalk-80 C++, Objected Pascal(Delphi), Java, C#, VB.NET C++: C OOPL Java: C++ OOPL C# C++

More information

Microsoft Word - Book9

Microsoft Word - Book9 葬 書 ( 下 ) 佈 陣 十 方 成 立 指 揮 中 心 層 巒 疊 障 千 山 翠 微, 紓 回 連 綿 的 重 山 復 重 山, 侍 朝 衛 迎, 前 後 有 序, 巋 巘 隱 逸 著 一 片 風 水 寶 地, 牛 臥 馬 馳, 鸞 飛 鳳 舞, 滕 蛇 委 蛇, 縈 藟 纏 繞 在 葺 襲 的 斷 續 峰 巒 之 間! 離 正 午 十 二 時 整 還 有 半 個 鐘 頭, 接 近 天 頂 的

More information

提问袁小兵:

提问袁小兵: C++ 面 试 试 题 汇 总 柯 贤 富 管 理 软 件 需 求 分 析 篇 1. STL 类 模 板 标 准 库 中 容 器 和 算 法 这 部 分 一 般 称 为 标 准 模 板 库 2. 为 什 么 定 义 虚 的 析 构 函 数? 避 免 内 存 问 题, 当 你 可 能 通 过 基 类 指 针 删 除 派 生 类 对 象 时 必 须 保 证 基 类 析 构 函 数 为 虚 函 数 3.

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes Fortran Algol Pascal Modula-2 BCPL C Simula SmallTalk C++ Ada Java C# C Fortran 5.1 message A B 5.2 1 class Vehicle subclass Car object mycar public class Vehicle extends Object{ public int WheelNum

More information

Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE "Project Properties" IDE makefile 1.

Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE Project Properties IDE makefile 1. Oracle Solaris Studio 12.2 IDE 2010 9 2 8 9 10 11 13 20 26 28 30 32 33 Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE "Project Properties" IDE makefile 1. "File" > "New

More information

<4D6963726F736F667420506F776572506F696E74202D20332D322E432B2BC3E6CFF2B6D4CFF3B3CCD0F2C9E8BCC6A1AAD6D8D4D8A1A2BCCCB3D0A1A2B6E0CCACBACDBEDBBACF2E707074>

<4D6963726F736F667420506F776572506F696E74202D20332D322E432B2BC3E6CFF2B6D4CFF3B3CCD0F2C9E8BCC6A1AAD6D8D4D8A1A2BCCCB3D0A1A2B6E0CCACBACDBEDBBACF2E707074> 程 序 设 计 实 习 INFO130048 3-2.C++ 面 向 对 象 程 序 设 计 重 载 继 承 多 态 和 聚 合 复 旦 大 学 计 算 机 科 学 与 工 程 系 彭 鑫 pengxin@fudan.edu.cn 内 容 摘 要 方 法 重 载 类 的 继 承 对 象 引 用 和 拷 贝 构 造 函 数 虚 函 数 和 多 态 性 类 的 聚 集 复 旦 大 学 计 算 机 科 学

More information

2/14 Buffer I12, /* x=2, buffer = I 1 2 */ Buffer I243, /* x=34, buffer = I 2 43 */ x=56, buffer = I243 Buffer I243I265 code_int(int x, char *buffer)

2/14 Buffer I12, /* x=2, buffer = I 1 2 */ Buffer I243, /* x=34, buffer = I 2 43 */ x=56, buffer = I243 Buffer I243I265 code_int(int x, char *buffer) 1/14 IBM Rational Test RealTime IBM, 2004 7 01 50% IBM Rational Test RealTime IBM Rational Test RealTime 1. 50% IBM Rational Test RealTime IBM Rational Test RealTime 2. IBM Rational Test RealTime Test

More information

Microsoft Word - 11.doc

Microsoft Word - 11.doc 除 錯 技 巧 您 將 於 本 章 學 到 以 下 各 項 : 如 何 在 Visual C++ 2010 的 除 錯 工 具 控 制 下 執 行 程 式? 如 何 逐 步 地 執 行 程 式 的 敘 述? 如 何 監 看 或 改 變 程 式 中 的 變 數 值? 如 何 監 看 程 式 中 計 算 式 的 值? 何 謂 Call Stack? 何 謂 診 斷 器 (assertion)? 如 何

More information

_汪_文前新ok[3.1].doc

_汪_文前新ok[3.1].doc 普 通 高 校 本 科 计 算 机 专 业 特 色 教 材 精 选 四 川 大 学 计 算 机 学 院 国 家 示 范 性 软 件 学 院 精 品 课 程 基 金 青 年 基 金 资 助 项 目 C 语 言 程 序 设 计 (C99 版 ) 陈 良 银 游 洪 跃 李 旭 伟 主 编 李 志 蜀 唐 宁 九 李 涛 主 审 清 华 大 学 出 版 社 北 京 i 内 容 简 介 本 教 材 面 向

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

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

第 15 章 程 式 編 写 語 言 15.1 程 式 編 写 語 言 的 角 色 程 式 編 寫 語 言 是 程 式 編 寫 員 與 電 腦 溝 通 的 界 面 語 法 是 一 組 規 則 讓 程 式 編 寫 員 將 字 詞 集 合 起 來 電 腦 是 處 理 位 元 和 字 節 的 機 器, 與

第 15 章 程 式 編 写 語 言 15.1 程 式 編 写 語 言 的 角 色 程 式 編 寫 語 言 是 程 式 編 寫 員 與 電 腦 溝 通 的 界 面 語 法 是 一 組 規 則 讓 程 式 編 寫 員 將 字 詞 集 合 起 來 電 腦 是 處 理 位 元 和 字 節 的 機 器, 與 程 式 編 写 語 言 在 完 成 這 章 後, 你 將 能 夠 了 解 程 式 編 写 語 言 的 功 能 了 解 高 階 語 言 和 低 階 語 言 之 間 的 分 別 知 道 翻 譯 程 式 的 意 義 和 能 夠 把 翻 譯 程 式 分 類 為 : 匯 編 程 式 編 譯 程 式 和 解 譯 程 式 認 識 不 同 翻 譯 程 式 的 優 點 和 缺 點 程 式 是 指 揮 電 腦 的 指

More information

untitled

untitled 1 Outline 料 類 說 Tang, Shih-Hsuan 2006/07/26 ~ 2006/09/02 六 PM 7:00 ~ 9:30 聯 ives.net@gmail.com www.csie.ntu.edu.tw/~r93057/aspnet134 度 C# 力 度 C# Web SQL 料 DataGrid DataList 參 ASP.NET 1.0 C# 例 ASP.NET 立

More information

Spyder Anaconda Spyder Python Spyder Python Spyder Spyder Spyder 開始 \ 所有程式 \ Anaconda3 (64-bit) \ Spyder Spyder IPython Python IPython Sp

Spyder Anaconda Spyder Python Spyder Python Spyder Spyder Spyder 開始 \ 所有程式 \ Anaconda3 (64-bit) \ Spyder Spyder IPython Python IPython Sp 01 1.6 Spyder Anaconda Spyder Python Spyder Python Spyder Spyder 1.6.1 Spyder 開始 \ 所有程式 \ Anaconda3 (64-bit) \ Spyder Spyder IPython Python IPython Spyder Python File

More information

Microsoft Word - p11.doc

Microsoft Word - p11.doc () 11-1 ()Classification Analysis( ) m() p.d.f prior (decision) (loss function) Bayes Risk for any decision d( ) posterior risk posterior risk Posterior prob. j (uniform prior) where Mahalanobis Distance(M-distance)

More information

EJB-Programming-3.PDF

EJB-Programming-3.PDF :, JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Value Object Design Pattern J2EE Design Patterns Value Object Value Object Factory J2EE EJB Test Client

More information

ebook14-4

ebook14-4 4 TINY LL(1) First F o l l o w t o p - d o w n 3 3. 3 backtracking parser predictive parser recursive-descent parsing L L ( 1 ) LL(1) parsing L L ( 1 ) L L ( 1 ) 1 L 2 L 1 L L ( k ) k L L ( 1 ) F i r s

More information

2015年计算机二级(C语言)模拟试题及答案(四)

2015年计算机二级(C语言)模拟试题及答案(四) 2016 年 计 算 机 二 级 (C 语 言 ) 模 拟 试 题 及 答 案 (4) 一 填 空 题 1 C 语 言 中 基 本 的 数 据 类 型 有 : 2 C 语 言 中 普 通 整 型 变 量 的 类 型 说 明 符 为, 在 内 存 中 占 字 节, 有 符 号 普 通 整 型 的 数 据 范 围 是 3 整 数 -35 在 机 内 的 补 码 表 示 为 4 执 行 下 列 语 句 int

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

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

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

CDWA Mapping. 22 Dublin Core Mapping

CDWA Mapping. 22 Dublin Core Mapping (version 0.23) 1 3... 3 3 3 5 7 10 22 CDWA Mapping. 22 Dublin Core Mapping. 24 26 28 30 33 2 3 X version 0.2 ( ) 4 Int VarcharText byte byte byte Id Int 10 Management Main Code Varchar 30 Code Original

More information

第5章修改稿

第5章修改稿 (Programming Language), ok,, if then else,(), ()() 5.0 5.0.0, (Variable Declaration) var x : T x, T, x,,,, var x : T P = x, x' : T P P, () var x:t P,,, yz, var x : int x:=2. y := x+z = x, x' : int x' =2

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

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

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

Microsoft Word - CIN-DLL.doc

Microsoft Word - CIN-DLL.doc 6.3. 调 用 动 态 链 接 库 (DLL) 相 对 于 CIN 来 讲,NI 更 推 荐 用 户 使 用 DLL 来 共 享 基 于 文 本 编 程 语 言 开 发 的 代 码 除 了 共 享 或 重 复 利 用 代 码, 开 发 人 员 还 能 利 用 DLL 封 装 软 件 的 功 能 模 块, 以 便 这 些 模 块 能 被 不 同 开 发 工 具 利 用 在 LabVIEW 中 使 用

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

ebook8-30

ebook8-30 3 0 C C C C C C++ C + + C++ GNU C/C++ GNU egcs UNIX shell s h e l l g a w k P e r l U N I X I / O UNIX shell awk P e r l U N I X C C C C C C U N I X 30.1 C C U N I X 70 C C U N I X U N I X U N I X C Dennis

More information

INTRODUCTION TO COM.DOC

INTRODUCTION TO COM.DOC How About COM & ActiveX Control With Visual C++ 6.0 Author: Curtis CHOU mahler@ms16.hinet.net This document can be freely release and distribute without modify. ACTIVEX CONTROLS... 3 ACTIVEX... 3 MFC ACTIVEX

More information

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F 1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET 2.0 2.0.NET Framework.NET Framework 2.0 ( 3).NET Framework 2.0.NET Framework ( System ) o o o o o o Boxing UnBoxing() o

More information

学习MSP430单片机推荐参考书

学习MSP430单片机推荐参考书 MSP430 16 MSP430 C MSP430 C MSP430 FLASH 16 1 CPU 16 ALU 16 PC SP SR R4~R15 2 3 00-FFH 100-1FFH 4 5 1 2 51 24 27 6 1 2 3 4 5 6 4 12 SR SP SR CPU SR CPU C Z N GIE CPUOff CPU OscOff SCG0 SCG1 CPU EXIT SP

More information

e bug 0 x=0 y=5/x 0 Return 4 2

e bug 0 x=0 y=5/x 0 Return 4 2 e 1 4 1 4 4.1 4.2 4.3 4.4 4.5 e 2 4.1 bug 0 x=0 y=5/x 0 Return 4 2 e 3 4 3 e 4 (true) (false) 4 4 e 5 4 5 4.2 1 G= V E V={n1,n2,,n m } E={e1,e2,,e p } e k ={n i,n j }, n i,n j V e 6 4.2 4 6 1 e 3 n 1 e

More information

Microsoft Word - C-pgm-ws2010.doc

Microsoft Word - C-pgm-ws2010.doc Information and Communication Technology 資訊與通訊科技 Loops (while/for) C 廻路 姓名 : 班別 : ( ) CS C Programming #1 Functions 函數 : 1 若 n=14, 求以下表示式的值 Expressions 表示式 Value 值 Expressions 表示式 Value 值 A 20 2 * (n /

More information

科学计算的语言-FORTRAN95

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

More information

6020

6020 6020 ... 1 1.1... 1 1.2... 1 1.3 6020... 2 1.3... 5 1.3.1... 5 1.3.2 ISA I/O (S1)... 5 1.3.3 (J4,5,6)... 6 1.3.4... 6... 9 2.1... 9 2.2... 9 2.3 COMPILING AND LINKING... 11 2.3.1 MICROSOFT C MICROSOFT

More information

ebook45-5

ebook45-5 5 S Q L SQL Server 5.1 5-1 SQL Server 5-1 A B S A C O S A S I N ATA N AT N 2 C E I L I N G C O S C O T D E G R E E S E X P F L O O R L O G L O G 10 P I P O W E R R A D I A N S R A N D R O U N D S I G N

More information

EJB-Programming-4-cn.doc

EJB-Programming-4-cn.doc EJB (4) : (Entity Bean Value Object ) JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Session Bean J2EE Session Façade Design Pattern Session Bean Session

More information

Microsoft Word - PHP7Ch01.docx

Microsoft Word - PHP7Ch01.docx PHP 01 1-6 PHP PHP HTML HTML PHP CSSJavaScript PHP PHP 1-6-1 PHP HTML PHP HTML 1. Notepad++ \ch01\hello.php 01: 02: 03: 04: 05: PHP 06:

More information

PowerPoint Presentation

PowerPoint Presentation Chapter 7 Pointers ( 指標 ) 1 Outline 7.1 Introduction 7.2 Pointer Variable Definitions and Initialization 7.3 Pointer Operators 7.4 Calling Functions by Reference 7.5 Using the const Qualifier with Pointers

More information

chp6.ppt

chp6.ppt Java 软 件 设 计 基 础 6. 异 常 处 理 编 程 时 会 遇 到 如 下 三 种 错 误 : 语 法 错 误 (syntax error) 没 有 遵 循 语 言 的 规 则, 出 现 语 法 格 式 上 的 错 误, 可 被 编 译 器 发 现 并 易 于 纠 正 ; 逻 辑 错 误 (logic error) 即 我 们 常 说 的 bug, 意 指 编 写 的 代 码 在 执 行

More information

相 应 功 能 (5) 再 将 Boy 类 作 为 Girl 类 的 友 元 类, 在 Boy 类 的 某 成 员 函 数 VisitGirl(Girl & ) 中 访 问 Girl 类 的 私 有 成 员, 观 察 编 译 器 给 出 的 信 息 ( 6 ) 删 除 两 个 类 中 的 函 数 V

相 应 功 能 (5) 再 将 Boy 类 作 为 Girl 类 的 友 元 类, 在 Boy 类 的 某 成 员 函 数 VisitGirl(Girl & ) 中 访 问 Girl 类 的 私 有 成 员, 观 察 编 译 器 给 出 的 信 息 ( 6 ) 删 除 两 个 类 中 的 函 数 V 面 向 对 象 程 序 设 计 及 C++ 课 程 实 验 教 学 大 纲 课 程 编 号 : B030001S 课 程 名 称 : 面 向 对 象 程 序 设 计 及 C++ 课 内 总 学 时 : 3 上 机 实 验 学 时 : 8 一 实 验 课 程 的 性 质 目 的 和 任 务 性 质 : 本 实 验 课 程 是 本 科 理 工 科 各 专 业 学 生 的 通 识 基 础 课, 该 实 验

More information

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

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

More information

untitled

untitled 2006 6 Geoframe Geoframe 4.0.3 Geoframe 1.2 1 Project Manager Project Management Create a new project Create a new project ( ) OK storage setting OK (Create charisma project extension) NO OK 2 Edit project

More information

Gerotor Motors Series Dimensions A,B C T L L G1/2 M G1/ A 4 C H4 E

Gerotor Motors Series Dimensions A,B C T L L G1/2 M G1/ A 4 C H4 E Gerotor Motors Series Size CC-A Flange Options-B Shaft Options-C Ports Features 0 0 5 5 1 0 1 0 3 3 0 0 SAE A 2 Bolt - (2) 4 Bolt Magneto (4) 4 Bolt Square (H4) 1.0" Keyed (C) 25mm Keyed (A) 1.0' 6T Spline

More information

1 32 a + b a + b 2 2 a b a b 2 2 2 4a 12a + 9 a 6 2 4 a 12a + 9 a 6 ( 2a 3) 2 a 6 3 1 2 4 + 2 4 8 + 3 6 12 + 1 3 9 + 2 6 18+ 3 9 27 + 1 10 1 10 ax + by = 2 cx 7y = 8 1 2 1 4 1 8 1

More information

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更 AX5000 Version 1.0 2006 年 9 錄...1 說...2 說...3...4 說...5 六...6 6.1 率...7 6.2 POST PAY...8 6.3 PREPAY DEPOSIT...9 6.4...10 6.5...11 更...12...12 LCD IC LED Flash 更 兩 RJ11 ( ) DC ON OFF ON 狀 狀 更 OFF 復 狀 說

More information

Microsoft PowerPoint - Lecture7II.ppt

Microsoft PowerPoint - Lecture7II.ppt Lecture 8II SUDOKU PUZZLE SUDOKU New Play Check 軟體實作與計算實驗 1 4x4 Sudoku row column 3 2 } 4 } block 1 4 軟體實作與計算實驗 2 Sudoku Puzzle Numbers in the puzzle belong {1,2,3,4} Constraints Each column must contain

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

Fuzzy GP

Fuzzy GP : 林 理論 數 論 1 率 2 類,, 金流量 金 利 數 益,, 3 不 異 (Multi- Valued) (Single-Valued) 數 數 數 (Local Optimum) (Global Optimum) 4 (Multi-valued) (Non-linear) (Self-learning) 5 (Genetic Programming, GP) GP 1. 亂數 2. (individuals)

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

EK-STM32F

EK-STM32F STMEVKIT-STM32F10xx8 软 件 开 发 入 门 指 南 目 录 1 EWARM 安 装... 1 1.1 第 一 步 : 在 线 注 册... 1 1.2 第 二 步 : 下 载 软 件... 2 1.3 第 三 步 : 安 装 EWARM... 3 2 基 于 STMEVKIT-STM32F10xx8 的 示 例 代 码 运 行... 6 2.1 GPIO Demo... 6 2.2

More information