所屬科目:研究所、轉學考(插大)、學士後-計算機概論
(a) software that controls the overall operation of a computer.
(b) combines Boolean values (true or false) to get a new value.
(c) the ability to define several operations with the same name that can do different things.
(d) characterized by the properties of inheritance and polymorphism.
(e) determines the partial or total path of a packet.
(f) a storage area that contains an address.
(g) replaces binary codes with symbols or mnemonics.
(h) a list in which entries are inserted and int c[4] = {1, 2, 4, 5}; removed only at the head. int unf(int k, int n)
2. Consider C function unf defined on the { right-hand-side. (a) What value will int m = 0; unf(3,4) return? (10%) (b) if unf(3,5) if (k == 1) { returns 3, unf(3,6) returns 4, unf(3,7) for (int i = 0; i < 4; i++) if (n == c[i]) returns 9, unf(3,8) returns 9, and return 1; unf(3,9) returns 6, what value will return 0; unf(4,10) return? (10%) }; for (int i = 0; i < 4; i++)
3. Suppose that C function rand() returns a if (n - c[i] > 0) random integer number in the range 0 to m += unf(k - 1, n - c[i]); return m; 32767. Determine the values of X and Y in }; the following C statement so that the value of integer variable n will be in the range 12 to 21. (% stands for the modulo operator) (10%) n = X – (rand() % Y);
4. Use 8 bits to represent (-27)10 in two’s complement format. (10%)
(a) Which operator should op be? AND, OR, or XOR? (10%)
(b) What is value of Y in hexadecimal format? (10%)