Thursday, 7 June 2012

oDesk U.S. English Basic Skills Test Answers Full

Q: Choose the series of pronouns that best completes the following sentence.
_______ is the name of the opera, and ______ role did you say Maria would pay?
Ans: c (what, which)

Q: Read the following question and choose the response that uses the correct corresponding verb tense.
Ans: a (No, because by the time I got there all the tickets had already been sold.)
Q: Choose the phrase that best completes the sentence below without creating a run-on sentence.
It’s never too late to learn how to swim ______ you may fall off a boat!
Ans: b (you never know when)
Q: Choose the series of verbs and phrases that best completes the following passage.
This dish ______ too spicy. Why _______ so much pepper?
Ans: e (a and c)
Q: Rearrange the following words to create the most logical and grammatically correct sentence.
With can’t phone, on whenever always to the time spend I speak I my friend, him
Ans: e (Whenever I can’t spend time with my friend. I always speak to him on the phone.
Q: Read the following question and choose the response that uses the correct corresponding verb tense.
Did you hear the weather report for tomorrow?
Ans: b (No, I wasn’t listening to the radio.)
Q: Choose the series of pronouns that best completes the following sentence.
Victor, who stole ______ ideas and used them to make ______ a millionaire, never once offered ______ a word of thanks.
Ans: d (our, himself, us)
Q: Which of the following sentences illustrates correct verb and verb tense usage?
Ans: e (All of the above)
Q: Choose the series of adjectives and adverbs that best completes the following sentences.
While ______ of our relatives live on the _______ hill in the country, ______of our friends live in the ________ area of the valley.
Ans: c (many, windiest, most, protected)


Q: Choose the series of adjectives and adverbs that best completes the following sentence.
Knowing that February was the ______ month of the year, Cheryl planned her vacation ________.
Ans: b (shortest, accordingly)
Q: Choose the phrase that best completes the sentence below without creating a run-on sentence.
Mr. Peach has sent his four children to lvy league colleges _______ he has sacrificed his health working day and night dusty factory.
Ans: b (; however)
Q: Choose the series of adjectives and adverbs that best completes the following sentences.
I think Pamela deserves to be punished for her _______ stupid and ______ behavior.
Ans: c (total, irresponsible)
Q: Choose the series of verbs that best completes the following sentences.
If Harry ________ to the party too early, don’t let him in; he ________ outside like everyone else.
Ans: a (gets, will have to wait)
Q: Which of the following sentences illustrates the proper use of parallel construction?
Ans: b (Although Tommy was failing his biology class at college, he was passing his chemistry class)
Q: Which of the following sentences illustrates the proper use of apostrophes?
Ans: a (Helga borrowed her friend’s skates for the day; however, she failed to return them.)
Q: Change the following sentences from a question to indirect speech.
“I will be moving soon.” said Alma
Ans: d (Alma says she would move soon.)
Q: Choose the series of verbs that best completes the following sentences.
Alison regrets _______ you with her remarks; she never meant ______ so.
Ans: b (to hurt, to do)
Q: Choose the series of pronouns that best completes the following sentences.
Don’t ______ think Larry should call ________ wife if _______ is going to be late for dinner?
Ans: a (you, his, he)
Q: Which of the following sentences illustrates correct pronoun usage?
Ans: e (None of the above)
Q: Complete the following sentences by choosing the phrase with the best word order from the option given.
Only after they had completed an exhaustive study ________ how to adapt the technology to the needs of our company.
Ans: c (they did begin to understand)
Q: Rearrange the following words to create the most logical and grammatically correct sentence.
days . for last has good weather few The been the not
Ans: d (The weather has not been good for the last few days)
Q: Choose the series of prepositions that best completes the following sentence.
I placed my notes ______ my desk and referred to them ______ the meeting.
Ans: b (beside, during)
Q: Which of the following sentences illustrates correct pronoun usage?
Ans: e (all of the above)
Q: Which of the following sentences illustrates proper sentence structure?
Ans: d (The queen had hardly finished her speech when the people began to disperse.
Q: Which of the following sentences is punctuated correctly?
Ans: d (“Come here,” she said, “and let me get a good look at you.”)
Q: Complete the following sentence by choosing the phrase with the best word order from the option given.
Those who are not wise _________.
Ans: d (does not need to be necessarily stupid)
Q: Read the following question and choose the response that uses the correct corresponding verb tense.
Does Jack wear that furry hat often?
Ans: d (No, he only wears it when his ears are cold.)
Q: Choose the series of prepositions that best completes the following sentence.
Charlotte knew ________ the secret investigation ________ her past, but she closed her eyes to it and pretended it happening.
Ans: a (of, about)
Q: Choose the series of adjectives and adverbs that best completes the following sentence.
The archaeologists were ______ to discover such a ________ and _______ _________ artifact at that mostly uncovered site.
Ans: b (amazed, rare, incredibly, beautiful)
Q: Choose the series of verbs that best completes the following sentence.
Everyone ________ too busy cooking and _______ the family of bears _______ from woods.
Ans: d (was, setting up, to notice, watching)
Q: Choose the series of articles and conjunctions that best completes the following sentence.
Julia, who is studying to be ________ foreign correspondent, is currently doing ______ internship in ______ Middle East _____ will return before the end of _______ year.
Ans: a {(no article required), an, the, but, the}
Q: Which of the following sentences is punctuated correctly?
Ans: b (We are expecting a hurricane this afternoon; therefore we have closed the school early.)
Q: Which of the following sentences illustrates the proper use of commas?
Ans: e (a and b)
Q: Change the following sentence from a quotation to indirect speech.
Rhonda says, “I get to work early every day.”
Ans: c (Rhonda has said that she got to work early every day.)
Q: Which of the following sentences does not illustrates correct pronoun usage?
Ans: e (all are correct)
Q: Which of the following sentences illustrates correct verb and verb tense usage?
Ans: b, d {(We think the judge will have noticed something strange in her behavior.), (Somehow, all of the newspapers gotten hold the story.)}
Q: Rearrange the following words to create the most logical and grammatically correct sentences.
Last what ! It’s did you night, over After
Ans: b (After what you did last night, it’s over!)
Q: Change the following sentence from a quotation to indirect speech.
“It may snow tomorrow,” He said.
Ans: d (He said it might snow tomorrow.)
Q:Choose the series of adjectives and adverbs that best completes the following sentence.
The helium _______ balloon rose ________ into the air; the villagers knew then their _______ leader was off on another mission.
Ans: c (powered, powerfully, powerful)
Q: Rearrange the following words to create the most logical and grammatically correct sentences.
Would I have it anything if had, I you known said would not bother
Ans: b (I would not have said anything if I had known it would bother you)

oDesk php 5 test answers full

Question 1
The setrawcookie() method of setting cookie is different from php standard method of cookie setting as :
  1. It does not allow expiry time to be set
  2. It can be used only once
  3. It does not url- ENCODE the value on its own
  4. 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.

  1. True
  2. False

Ans: B

Question 3

Which of the following is not a valid php connection status?
  1. Aborted
  2. Normal
  3. Open
  4. Timeout

Ans:  C

Question 4

Which of the following statements is not true with regard to abstract classes in php5?

  1. Abstract classes are introduced in php 5
  2. A class with a single abstract method must be declared abstract
  3. Abstract class can contain abstract methods
  4. 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;
?>

  1. real
  2. double
  3. decimal
  4. Boolean

Ans: C
Question 7

What is the result of the following expression?

5+2*4+6
  1. 70
  2. 19
  3. 34
  4. 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:
  1. checkbox
  2. select
  3. file
  4. 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;
?>

  1. 100
  2. 200
  3. 500
  4. 0
  5. 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”?

  1. Filesize
  2. Size
  3. sizeofFile
  4. getSize

Ans: A

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

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

Ans: D

Question 15

Which one is correct?

  1. $s=fwrite(“a string here”);
  2. $s=fwrite($fp,”a string here”);
  3. $s=fwrite(“a string here ”,$fp);
  4. 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”;
?>
  1. 0.9
Not Equals
  1. 1
Equals
  1. 1
not Equals
  1. 1.1

Ans: C

Question 18

Which of the following attribute is needed for file upload via form?

  1. Enctype=”multipart/form-date”
  2. Enctype=”singlepart/date”
  3. Enctype=”file”
  4. Enctype=”form-data/file”

Ans: A

Question 19

Late php versions support remote file accessing for the functions:

  1. Include()
  2. Include_once()
  3. Require_once()
  4. 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 “???”?

  1. Parent:: getSal();
  2. Person::getSal();
  3. Parent::getsal;
  4. Person::getSal;

Ans: A
oDesk PHP 5 test answers

What is true regarding this code?


setcookie will return true


Question:
Which of the following is not a correct way of printing text in php5?


echo "Plain text";



Question:
Which of the following is not the correct way of starting a session?


session_initiate()

                                                                                                                       
Question:
Which of the following functions do you need to implement HTTP Basic Authentication?


None of the above

Question:
Which of the following Command Line Interface constant is not defined in the CLI SAPI?


STDPRT

Question:
Which of the following statements is correct with regard to final and abstract?

a. An abstract class cannot have final methods
Question:
Which composite data types are supported by php?

Array

Question:
The default value of register_globals in PHP is:

Off

Question:
Which of the following is not a valid PHP connection status?

 open

Question:
Choose the correct statement:

include() includes and evaluates a specific file


require_once() includes and evaluates a specific file only if it has not been included before
posted by khalequzzaman
Question:
If the session_cache_expire() is not set, then by default the session cache will expire after:

3 hrs

Question:
What will be the output of the following script?
$count=50;
function Argument()
{
$count++;
echo $count;
}
Argument();
?>

 It will print 1

Question:
State whether True or False

Paamayim Nekudotayim operator allows access only to the static members of a class?

True

Question:
Which of the following statements is true with regard to comparisons in PHP5?


With (===) operator, object variables are identical if and only if they refer to the same instance of the same class.

Question:
Which of the following built-in function assist in checking if actually the function exists or not?
function_exists


 Question:
What will be the output of the following code?
$a = 0.0;

for ($i = 0; $i < a ="="">

1
Question:
What will be the output of the following code?
$i=4;
$j=30;
$k=0;
$k=$j++/$i++;
echo $i . " " . $j . " " . $k . " ";

5 31 7.5

Question:
Which of the following is a not a correct way of commenting in php?

/#PHP Comment


Question:
Following is a php code block:
$m=9;
$n=99;
$z=8;
$z=$n++/$m++ + --$z;
echo $z;

what will be the output?

18


Question:
Which of the following is the correct way of specifying default value?


function GetDiscount($Type = "Special") { . . . }

Question:
With reference to the following php script:
print 'Text Line1'
print 'Text Line2'
?>

What will be the output on running the script?


Error message will be printed



Question:
What will be the ouput of the following code?

for ($i = 0; $i < i ="="">

0134
Question:
Late PHP versions support remote file accessing for the functions:

include_once()
require_once()
both of them


Question:
You have designed a user login form as follows:

User Name:  
Password:  
How can you access the username entered by the user in the 'Validate.php' webpage?


a. $var= $_POST['username'];
b. $var= $_REQUEST['username'];
c. import_request_variables('p', 'p_');
$var= $p_username;
Both of them



Question:
Which of the following does not represent logical AND operator in PHP?
&amp
Question:
Which of the following is not true for a persistent connection?
These can't be converted to non-persistent connections

Question:
Which of the following are invalid data types in PHP?


char


Question:
The Manager and Office classes are as follows:
class Manager{
function printName() {
echo "Manager";
}
}
class Office{
function getManager() {
return new Manager();
}
}

$ofc = new Office();
???

?>
Which of the following should replace '???' to obtain the value of printName() function?


$ofc->getManager()->printName();

Question:                                                             
The classes are defined as follows:abstract class BaseCls{
protected abstract function getName();
}

class ChildCls extends BaseCls{

}
Which of the following implementations of getName() is invalid in ChildCls?

 public function getName(){}

Question:
Which of the following variable declarations within a class is invalid in PHP5?

var $term =3;
Question:
What will be the output of following code?
$arr = "a";
$arr[0]="b";
echo $arr;
echo $arr[0];


bb

Question:
For the following code:
the output will be:

171

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

19

Question:
What will be the output of following code?
$var = 1 + "-1.3e3";
echo $var;

-1299

Question:
What will be the output of following code?
$var1="a";
$$var1="b";
echo "$var1 $a";

a b

Question:What is the output of the following code?
$a = 500;
$b = 200;

echo $a % 2
* $b;
?>

0

Question:
What will be the ouput of the following code?

if (-1)
print "true";
else
print "false";
?>

true


Question:
What will be the output of the following code?
echo 12 . 6;

126

Question:
Consider the following sample code:
$x = 0xFFFE;
$y = 2;
$z = $x && $y;

What will be the value of $z?

1 

Red is the ANSWERS