98年 中華電信招考 專業職(一)專員 資訊類 程式設計及資料庫原理 試卷

pdf
249.73 KB
侵權投訴
加載中. ..
PDF



98






(
)



64001
64101
64201



20
 !"#$% &'(
)*+,-./0
2B
1234.567$89:4;<6=>?@
34.67ABCD$ EF(
GHIJKLMNOPQ
0
R
9
ST U
×÷% =
+/- C AC TAX+ TAX- GT MU MR MC M+
M-
VWXYZ[&apos;]G(



 !"#$%
 !"#$% !"#$%
 !"#$%&
&&
&




(
3
)
4
1.

n

4

m

5

++(n*m);
25
21
20

2
2.
C++
 !"
#include<stdio.h>
void swap(int a, int b);
main()
{
int m=5, n=3
swap(m, n);
printf("The value of m=%2d n=%2dn",m,n);
}
void swap(int &x, int &y)
{
int temp = y;
y = x;
x = temp;
}
#$%&&apos;(
m = 5 n = 3
m = 3 n = 5
m = 5 n = 5
m = 3 n = 3



3
5

C++
)*+,-./0 12
3~5
3"
line 1. #include <iostream>
line 2. using std::cout;
line 3. using std::endl;
line 4. class Test
line 5. {
line 6. public:
line 7. Test( int = 0 ); // default constructor
line 8. void what( );
line 9. private:
line 10. int x;
line 11. }; // end class Test
line 12. // constructor
line 13. Test::Test( int value )
line 14. : x( value )
line 15. {
line 16. // empty body
line 17. } // end constructor Test
line 18. void Test::what( )
line 19. {
line 20. cout << " x = " << x++;
line 21. cout << " this->x = " << this->x;
line 22. cout << " (*this).x = " << ( *this ).x << endl;
line 23. } // end function what
3
3.
456789:
Test a;
Test a(10);
Test a=10;
Test a( );
2
4.
; !
private
x
5
<
what( )
-$%&&apos;(
x=5 this->=5 (*this).x=5
x=5 this->=6 (*this).x=6
x=6 this->=5 (*this).x=5
x=5 this->=6 (*this).x=5
4
5.
:
private
x
=>?
Class Test
@AB
what( )
C
Class Test
DEF
G
14
"
x( value )
CH
x
I
this
CJKLJ
Test
MN
2
6.
OP&"
void what(int *a, int b)
{
*a = b;
}
int main(void)
{
int x[]={10, 12, 5, 8, 2, 15, 14};
int i;
what(&x[0], 5);
what(&x[2], x[5]);
what(&x[5], x[2]);
for(i=0; i<7; i++)
printf("x[%d]=%3dn", i, x[i]);
return(0);
}
10 12 5 8 2 15 14
5 12 15 8 2 15 14
5 12 5 8 2 2 14
5 12 5 8 2 15 14
4
7.
F!Q78
mystery(4, 6)
<1R$CST
int mystery( int a, int b )
{ if ( b == 1 )
return a;
else
return a + mystery( a, b - 1 );
}
4
6
12
24
1
8.
java
U+,VWHI"
int[][] scores = {{54, 68},{67, 78}, {89, 93}};
:
scores[1][2]

93
scores[1][1]

78
VCJ
3 x 2
XYV
scores[1][0]

67
1
9.
!
speed
C
75

if

fee
$ZH[J
?
if (speed > 35)
fee = 20.0;
else if (speed > 50)
fee = 40.0;
else if (speed > 75)
fee = 60.0;
20.0
40.0
60.0

2
10.
java
-$]&&apos;(
public class Exam15
{
public static void main(String[] args)
{
int count = 0; //
^_
float len = 100.0f;
do
{ count++;
len /= 2.0;
} while ( len > 20.0 );
System.out.println("
`a _
: " + count);
System.out.println("
bcd
: " + len);
}
}
`a _
: 2
`a _
: 3
bcd
: 25
bcd
: 12.5
`a _
: 0
efg
bcd
: 100
2
11.
hi
java
$%&&apos;(
public class Exam18
{
public static void main(String[] args)
{
int i;
int total = 0;
for ( i = 1; i <= 10; i++ )
{ if ( (i % 2) != 0 ) continue;
total += i;
}
System.out.println("
j k
: " + total);
}
}
j k
: 55
j k
: 30
j k
: 25
efg
2
12.
l
F/B-C+D*E-A*C
m  n
(postfix)

-*AC+*DE-C/FB
FB/C-DE*+AC*-
F/B-C+D*E-A*C
FB/D-CE*+AE*-
4
13.
:oC5Dpqrs
(Data Model)
tu
pq5
(Data structure)
pq
(Data manipulation)
ivwNxy
(Integrity constraints)
pqz{
(Data concepts)
2
14.
|}pq~@J|}L:
(tuples)
-Cn
(attributes)
-Cn
C
(atomic value)
o
(tuples)
3
15.
|Q
(primary key)
:
J|}Q=>
Q
(uniqueness)
QpqC
QC
(non-null)
4
16.
:
SQL
Cpq[¡¢
(DDL)
SELECT-FROM-WHERE
UPDATE a relation
INSERT INTO a relation
CREATE TABLE
2
17.
J
SQL
CB£H[pq~xywN
CREATE TABLE
CREATE ASSERTION
DEFINE TRIGGER
CREATE INDEX
3
18.
¤¥¦¢§¨©ª«¬®¯°pq~±pq~@pq
HTML
Java Applet
JSP
JavaScript
4
19.
²³|¬´Lµz{¶·P¸pq
COURSE
k
STUDENT
¹J²³-|º
»¸¼S¶·PJ¶·P¼S»¸<¹:-|¬"
1
`
1
1
`S
S `
1
S `S
4
20.
?pq~®¯½¾¿kÀÁ
(persistent)
nÂF
(
r
)
à "
AB:´ÄÅÆ
(GUI)
ÇȰ
(client program)
ÉÊ
(embedded program)
˾
(stored program)


(



20
)

 

O§hi"ÌÍÎÊ
20
JiÎÊÏÐÑÎÊ-ÏÒÓ:ÔÕÓ
&Ö-ÏWlbÌר&Ù
Ú Û
1
]ÊÜ"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5
]&Ü"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Ú Û
2
]ÊÜ"
7 2 2 2 2 2 2 2 2 2 6 6 2 7 1 1 2 2 2 2
]&Ü"
7 2 6 1

 

´ÝÞßàáâãä|pqpq~²³|¬
(Entity-Relationship)
´.å´z{l-m
|¬pq~
(Relational database)
.æçè|}QÙ
收藏 ⬇️ 下載