You are on page 1of 5

Question One: Sample Multiple Choice Questions

1) Which of the following IP addresses (hosts) belong to the biggest network?


a. 217.4.2.123
b. 121.34.22.134
c. 135.76.9.1
d. b and c

2) An application that enables a user to login to a remote host and interact with it
(run programs there) as if that host was at his/her desk is called ___________.
a. NFS
b. Telnet
c. SMTP
d. HTTP

3) MIME ___________ a mail protocol ________ replace SMTP.


a. is, and can
b. is, but can not
c. is not, but can
d. is not, and can not

4) Which application is used to view web pages?


a. SMTP Server
b. FTP Client
c. Web Server
d. Web browser

5) Which of the following is/are advantage(s) of IPV6?


a. More addresses
b. Allows describing objects in pages
c. Shorter address length
d. First and third of the above

6) Which HTML tag is used for unnumbered list?


a. UL
b. OL
c. TR
d. TD

7) A __________ is a set of content shared by a well-defined group within a


single organization, using Internet protocols and standards.
a. Internetwork
b. Internet
c. Intranet
d. Extranet

8) What is the default port number that a Web browser will access a Web site?
a. 23
b. 25

1
c. 80
d. 110

Question 2: Find and describe the output of the following HTML that is
linked to an internal CSS (6 Marks).
<html><head>
<style type="text/css">
<!--
hr {color: red}
h1 {text-decoration: overline}
h3 {color: green}
p {font-size:11pt; margin-left: 20px}
p.size {letter-spacing: -3px}
body {background-image: url("images/back40.gif")}
span.abc{ background-color: yellow}
-->
</style>
</head>
<body>
<h1>ITCS 373 Mid-Term Exam</h1>
<p>Welcome to <span class="abc"> University of Bahrain </span>
Website.</p>
<p class="size">Computer Science</p>
<hr />
<h3>This is Header</h3>
</body></html>

2
Question 3: Write the necessary HTML tags to represent the page below
(assume any file-name for the picture used below). (15 Marks)

3
Question 4: Write JavaScript statements to do the following
1. Write a statement that define a regular expression that matches all strings that
starts with one digit followed by 3 capital letters followed by one or more dots
characters and ending with 2 digits.

2. Write a statement to change the second image file to "a1.gif" in a webpage.

3. Write a statement to reset the first form elements in a webpage.

4. Write a statement to display an alert window containing the number of


elements in the second form in a webpage.

5. Write a statement in the grandchild window to change the value of the first
text field to "test" in the first form in the parent window.

4
Question 5: (14 Marks)
Write a JavaScript function named calculate() which is activated when the user clicks
on a button. The function takes the input from the text field (named myList) in the
following format: n1,n2,n3,n4,n5, …..etc (a list of integer numbers separated by
comma). Your function must display the following in new window:
1. The list size (total numbers in the list)
2. Total of even numbers.
3. Maximum Number.
The function then stores the all the above information in a cookie called result with a
value in the following format: even#max#size.

function calculate(){

You might also like