IT3505 - 2020 - Part 1
IT3505 - 2020 - Part 1
Important Instructions :
The duration of the paper is 1 (one) hour.
The medium of instruction and questions is English.
The paper has 20 questions and 6 pages.
All questions are of the MCQ (Multiple Choice Questions) type.
All questions should be answered.
Each question will have 5 (five) choices with one or more correct answers.
All questions will carry equal marks.
There will be a penalty for incorrect responses to discourage guessing.
The mark given for a question will vary from 0 (All the incorrect choices are marked
& no correct choices are marked) to +1 (All the correct choices are marked & no
incorrect choices are marked).
Answers should be marked on the special answer sheet provided.
Note that questions appear on both sides of the paper.
If a page is not printed, please inform the supervisor immediately.
Mark the correct choices on the question paper first and then transfer them to the
given answer sheet which will be machine marked. Please completely read and
follow the instructions given on the other side of the answer sheet before
you shade your correct choices.
Calculators are not allowed.
All Rights Reserved.
1
1) Select the correct HTML script(s) which will give the list output given below.
1. Amal
2. Nimal
3. Sunil
2) What is/are the correct HTML script(s) for inserting an image with height and width of 42 pixels?
3) Which of the following tags can be used to make a text bold in HTML?
4) Which of the following is/are a single global function(s) defined in the jQuery library?
2
7) Which of the following symbol can be used to comment in JavaScripts?
(a) \\ (b) //
(c) \**\ (d) \**/
(e) /**/
8) Which of the following Java Script can be used to retrieve the set of all div elements in a document?
(a) var divs = $(div);
(b) var divs = $("div");
(c) var divs = #("div");
(d) var divs = jQuery("div");
(e) var divs = jQuery£("div");
3
(a) 123123 (b) 232425 (c) 323335
(d) 827364 (e) Error
12) Which of the following statement(s) is/are true about the embedding PHP scripts inside an HTML
document.
(a) PHP scripts must always be written inside <?php and ?> tags.
(b) PHP scripts can be imported from an external file using the include statement.
(c) PHP scripts can be included only in the header section of an HTML document.
(d) Some PHP scripts will be executed properly even without the closing PHP tag (?>)
(e) PHP scripts must always be included in the body section of an HTML document
4
13) What is the value of $a?
(a) 3 (b) 7 (c) 24
(d) 46 (e) 246
17) Which of the following PHP function definitions is/are syntactically correct?
a. b.
function fn(){ function fn(){
echo "hello"; echo $xyz;
} }
c. d.
function fn($xyz){echo function
$xyz;} fn($xyz,abc){
echo $xy;
}
e.
void function
fn($xyz,$_xyz){
echo $xyz,$_xyz;
}
18) Which of the following is/are correct ways of creating an array in PHP?
5
19) What is the output of the following PHP code?
<?php
$countries = array("Sri Lanka" => array
("population" => "21,05,000", "capital" =>
"Colombo"),
"India" => array("population" => "13,53,000,000",
"capital" => "Mumbai"));
20) Which type of function call is/are used in the following PHP script?
<?php
function calcPrice($price, $tax)
{
$total = $price + $tax;
}
$pricetag = 15;
$taxtag = 3;
calcPrice($pricetag, $taxtag);
echo $pricetag;
?>
*************************