Tuesday, February 28, 2012

Odesk HTML Test 4.01



Question no. 1
Which of the following statements is correct for a blockquote?
a. It make the text a bit bigger for emphasizing.
b. It defines the start of a long quote.
c. It makes the text slightly bolder.
b. It defines the start of a long quote.

Question no. 2
Which of the following is incorrect about the relation between HTML and XHTML?
a. XHTML is a stricter and cleaner version of HTML.
b. XHTML is almost identical to HTML 4.01.
c. XHTML and HTML both are used to generate dynamic content.
d. XHTML brings together the elements of HTML and the syntax of XML.
b. XHTML is almost identical to HTML 4.01.

Question no. 3
Choose the incorrect statement(s):
a. An HTML attribute is additional information included inside a tag.
b. HTML is case sensitive.
c. All the HTML4.01 tags must be paired.
d. Your browser may appear to correctly use newly deprecated code for the present, but its support for deprecated code could be
halted at any time after the browser is updated.
b. HTML is case sensitive.

Question no. 4
Which of the following tags can be used in place of a button tag?
a. legend
b. ol
c. input
d. dl
c. input

Question no. 5
Which of the following is not a valid input type of the form tag?
a. checkbox
b. image
c. hidden
d. button
e. All are valid
e. All are valid




Question no. 6
It is not necessary to give the coordinates for an image or object defined within an area tag, if the value of its shape attribute is:
a. circle
b. poly
c. default
d. rect
c. default

Question no. 7
Which of the following is/are a valid value for the type attribute of the input tag?
a. text
b. icon
c. reset
d. password
a. text , c. reset , d. password

Question no. 8
Which of the following is not correct for an action attribute for a form tag?
a.The action attribute can be defined at runtime.
b. If the value for action is null (action=""), then the form submits user data to itself.
c. If the URL is not provided to the action attribute, the form will not submit user data anywhere.
d. None of the above
d. None of the above

Question no. 9
Which of the following values is/are valid for the align attribute of a tag?
a.left
b.right
c.center
d. offset
a. left, b. right, c. center

Question no. 10
What do you infer from the following code? Expert Rating
a.This href is using absolute path for linking.
b. This href is an example of relative path linking.
a. This href is using absolute path for linking.

Question no. 11
Which of the following statements is correct for the tag?
a. The text under block quote must be enclosed in a block level element in a strict DTD document.
b. The attribute named cite must be specified.
c. Closing the tag is optional.
d. It places an empty line after the text.
()

Question no. 12
Which of the following is/are not true for a paragraph tag in HTML 4.01?
a. The text must be enclosed in

and
tags.
b. It creates an empty line above its starting line.
c. It cannot be used within a tag.
d. It creates an empty line after its ending line.
b, C

Question no. 13
A piece of text contains many blank spaces within it. Which of the following tags would be suitable to display the text as it was originally formatted?
a. td
b. p
c. ls
d. pre
d. pre

Question no. 14
You are creating several web pages for a website that contain several rather large data tables, many of which are somewhat similar in the number of columns, rows, and in other common table formatting. In addition, CSS will be employed for formatting the tables. Which one of the following types of CSS has the highest priority over the others and typically requires the greatest total amount of code space for the entire website for formatting the various table cells?
a. External style sheet
b. Inline style
c. Internal style sheet
d. Browser default
a. External style sheet

Question no. 15
Which of the following attributes is/are related to the tag?
a. height
b. alt
c. src
d. All of the above
d. All of the above

Question no. 16
The following link is placed on an HTML webpage.
MSDN
What do you infer from it?
a. It will open the site msdn.com in the same window.
b. It will open the site msdn.com in a new window.
c. It will open the site msdn.com in a frame below.
d. It will not be clickable as it is not formed correctly.
b. It will open the site msdn.com in a new window.

Question no. 17
Is the following code valid in HTML 4.01 Strict?
    1. A
    2. B
      • Item1
      • Item 2
    3. C
a. Perfectly valid.
b. Invalid because you should not have three levels of nesting in the lists.
c. Invalid because you should not have an unordered list within an ordered list.
d. Invalid because a
    tag should not conflict with an
      tag at the same list level. a. Perfectly valid. Question no. 18 Which of the following values for the scrolling attribute for the frame tag is not valid? a. yes b. default c. auto d. no () Question no. 19 Which of the following is/are not correct for a tag in HTML 4.01? a. It is more useful if it is placed in a head element. b. It can be used to specify the keywords for the search engines. c. It can be used to redirect users to other URLs. d. It is mandatory to specify its name or scheme attributes. d. It is mandatory to specify its name or scheme attributes. Question no. 20 The tag that is used to pass the parameters to an applet is: a. appletpar b. applet c. param d. val Param Question no. 21 Which of the following attributes is/are valid for a select tag contained within a form tag? a. name b. size c. multiple d. All of the above d. All of the above Question no. 22 For the following items of a b. c. d. d. Question no. 26 Which of the following set of coordinate values refers to an image defined by the area tag with the value of poly for its shape attribute? a. coords="150,217,190,257,150,297,110,257" b. coords="150,190,150,110" c. coords="150,217,190,257,150" d. coords="150,110,190,220,150,150,120" (b) Question no. 27 What is meant by the cellspacing attribute? a. It makes the cell span more than one column. b. It specifies the space between the cell wall and the contents of the cell. c. It specifies the space between two cells. d. It makes the cell span more than one row. c. It specifies the space between two cells Question no. 28 Which of the following attributes comes in handy when borders have to be put between groups of columns instead of every column? a. col b. colgroup c. rowspan d. row b. colgroup Question no. 29 A few lines in an HTML paragraph are to be formatted differently from the rest of the lines. Which tag will assist in this? a. div b. p c. span d. format b. p Question no. 30 How will you specify a comment in an HTML document? a. b. <-Here is a comment.. -> c. d. c. Question no. 31 Which of the following is correct regarding the frame attribute in the tag? a. It is used to add a frame to the table. b. A hsides value for the frame attribute will show the border lines for horizontal sides only. c. A hsides value for the frame attribute will not show the border lines for horizontal sides only. d. A hsides value for the frame attribute will add a scrollable frame on the horizontal sides. Question no. 32 What is meant by cellpadding? a. It makes the cell span more than one column. b. It specifies the space between the cell wall and the contents of the cell. c. It specifies the space between two cells. d. It makes the cell span more than one row. Question no. 33 Within a table cell b. c. d. Question no. 36 What would you infer from the following code in an HTML 4.01 Web site? a. The top margin and left margin of the webpage is 2 pixels. b. The bottom margin and right margin of the web page is 2 pixels. c. Both of the above. d. None of the above. The topmargin and leftmargin attributes are not valid HTML 4.01 body attributes. a. The top margin and left margin of the webpage is 2 pixels. Question no. 37 You specified a base tag and anchors as follows: 1. 2. Yahoo 3. Google Which of the following is true for the above code? a. Only the Yahoo link will open in a new window. b. Only the Google link will open in a new window. c. Both links will open in a new window. d. Both links will open in the same window. c. Both links will open in a new window. Question no. 38 On one of your Web pages named Listing.html, you specified a target like this: Old Listing How will you make a link to the above target? a. Check Old Listing as well b. Check Old Listing as well c. Check Old Listing as well d. Check Old Listing as well b. Check Old Listing as well

      Question no. 39
      Which attribute specifies the submit URL in a form tag?
      a. method
      b. action
      c. name
      d. id
      b. action



PHP5 ODESK Test Answer



Question 1
The setrawcookie() method of setting cookie is different from php standard method of cookie setting as :

It does not allow expiry time to be set
It can be used only once
It does not url- ENCODE the value on its own
It does not allow domain setting

Ans: C
Question 2
IF visibility is not defined for a method /member then it is treated as public static.

True
False

Ans: B
Question 3
Which of the following is not a valid php connection status?

Aborted
Normal
Open
Timeout

Ans: C
Question 4
Which of the following statements is not true with regard to abstract classes in php5?

Abstract classes are introduced in php 5
A class with a single abstract method must be declared abstract
Abstract class can contain abstract methods
Abstract method must have method definition and can have optional empty braces following it

Ans : C
Question 5
What will be the result of following operation?
Print 4<<5; a. 3 b. 128 c. 120 d. 6 Ans: B Question 6 Which of the following type cast in not correct? $fig=23; $varbl=(real)$fig; $varb2=(double)$fig; $varb3=(decimal)$fig; $varb4=(bool)$fig; ?>

real
double
decimal
Boolean

Ans: C
Question 7
What is the result of the following expression?
5+2*4+6

70
19
34
21

Ans: B
Question 8
The classes are defined as follows
Abstract class BaseCls(
Protected abstract function getName();
}
Class childCls extends BaseCls{
}
Which of the following implementations of getName() in invalid in childCls?
a. Protected function getName(){}
b. Function getName(){}
c. Private function getName(){}
d. Public function getName(){}
Ans: D
Question 9
Multiple select/load is possible with:

checkbox
select
file
all of the above

Ans : A
Question 10
State whether true or false
Paamayim nekudotayim operator allows access only to the static members of a class?
a. True
b. False
Ans: A
Question 11
What is the output of the following code?
$a=500;
$b=200;
echo $a % 2 * $b;
?>

100
200
500
0
Syntax error

Ans: D
Question 12
You need to heck the size of a file in php function .
$size=X(filename);
which function will suitable replace “X”?

Filesize
Size
sizeofFile
getSize

Ans: A
Question 14
Which of the following is not true for a persistent connection?

these are not closed even after the execution of the script
these are mainly used to increase the efficiency of the system
These can’t be converted to non-persistent connections
These are preferable not used in the scripts involving transactions

Ans: D
Question 15
Which one is correct?

$s=fwrite(“a string here”);
$s=fwrite($fp,”a string here”);
$s=fwrite(“a string here ”,$fp);
none of the above

Ans B
Question 16
Which of the following in not a correct way of printing text in php 5
a.
echo “plain text”
?>
b.
c.
d. <# echo “plain text” #>
Ans: C
Question 17
Which will be the output of the following code?
$a=0.0;
For($i=0;$i<10;$i++) $a+=0.1; print “$a\n”; if ($a==1.0) print “equals”; else print “not equals”; ?>

0.9

Not Equals

1

Equals

1

not Equals

1.1

Ans: C
Question 18
Which of the following attribute is needed for file upload via form?

Enctype=”multipart/form-date”
Enctype=”singlepart/date”
Enctype=”file”
Enctype=”form-data/file”

Ans: A
Question 19
Late php versions support remote file accessing for the functions:

Include()
Include_once()
Require_once()
All of the above

Ans : D
Question 20
Given below is a small php script:
class person {
function getSal()
{
……
……
}
}
class emp extends person {
fucniton getSal()
{
???
}
}
?>
the getSal() of emp has to behave exacltyle as getSal() of person . Which of the following lines of code would you use to replace the “???”?

Parent:: getSal();
Person::getSal();
Parent::getsal;
Person::getSal;

Ans: A