Automation Service

Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

31 January 2012

odesk php5 test answers 2013


Php
Please,Check on the Green Color text of every post .....its urgent for everyone.
1……
Following is a php code block:
$m=9;
$n=99;
$z=8;
$z=$n++/$m++ + –$z;

2……
what will be the output?
a. 16
b. 18
c. 19
d. 20
e. 17
3……

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

a. function GetDiscount($Type = “Special”) { . . . }
b. function GetDiscount(Type := “Special”) { . . . }
c. function GetDiscount($Type := “Special”) { . . . }
d. function GetDiscount($Type : “Special”) { . . . }

4……..


What will be the output on running the script?

a. Text Line1Text Line2
b. Text Line1 Text Line2
c. ‘Text Line1′
d. ‘Text Line2′
e. Error message will be printed

5…….


What will be the ouput of the following code?

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

a. 0
1
2
3
4
5
b. 0
1
3
4
c. 2
d. 0
1
2
4
e. None of the above

6………

Late PHP versions support remote file accessing for the functions:

a. include()
b. include_once()
c. require_once()
d. Both a and b
e. Both b and c


7………..

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;
d. All of the above


8………..

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;
d. All of the above




9………….
what would be the output of the following code?
$stg=’good day’;
$stg= ucwords($stg);
echo $stg;
?>
a. good day
b. GOOD DAY
c. Good Day
d None of the above
10……….
which of the following command line interface constant is not defined in the cli sapi?

a. STDIN
b. STDOUT
c. STDPRT
d STDERR
11………….

if the session_cache_expire()is not set,then by default the session cache will expire after:

a. 1 hr
b. 2 hr
c. 3 hr
d 4 hr

12………….

Which of the following is not a correct way of commenting in php?
a. //php comment
b. /*php comment*/
c. #php comment
d /# php comment

13……………

If the session_cache_expire() is not set, then by default the session cache will expire after:

a. 1 hr
b. 2 hrs
c. 3 hrs
d. 4 hrs


14……………

What will be the output of the following code?

$a = 0.0;

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

a. 0.9
Not Equals
b. 1
Equals
c. 1
Not Equals
d. 1.1
Not Equals
e. None of the above


15………….


What will be the output of the following code?

$i=4;
$j=30;
$k=0;
$k=$j++/$i++;
echo $i . ” ” . $j . ” ” . $k . ” “;

a. 5 31 6
b. 5 31 6.2
c. 5 31 7
d. 4 31 7.5
e. 5 31 7.5


16………..


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

a. //PHP Comment
b. /*PHP Comment*/
c. #PHP Comment
d. /#PHP Comment


17………….

What will be the output of the following script?

$count=50;
function Argument()
{
$count++;
echo $count;
}
Argument();
?>

a. It will print 50
b. It will print 51
c. It will print 52
d. It will print 1


18…………..

State whether True or False

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

a. True
b. False

19………….

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

a. With “= =” operator, two object instances are equal if they have the same attributes and values, and are instances of a different class.
b. With “==” operator two object instances are equal if they have the same attributes and values, and are instances of the same class.
c. With (===) operator, object variables are identical if and only if they refer to the same instance of the same class.
d. With (===) operator, object variables are identical if and only if they refer to the different instance of the same class.


20………….

What should be the code in line 3, if the file name to upload is “SalesFile”?

a.
b.
c.
d.


21………….


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

a. exists
b. function_exists
c. fexists
d. isFunction

Answer: b;


22………….

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

a. An abstract class cannot have final methods
b. An abstract class cannot have non abstract methods
c. A final class cannot have abstract methods
d. A final class cannot have final methods


23………..

Which composite data types are supported by php?

a. Array
b. Enumeration
c. List
d. Object
e. Integer


24……………

The default value of register_globals in PHP is:

a. Off
b. On


25………….

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

a. aborted
b. normal
c. open
d. timeout

26…………….

Choose the correct statement:

a. include() includes and evaluates a specific file
b. require() includes and evaluates a specific file
c. include_once() includes and evaluates a specific file only if it has not been included before
d. require_once() includes and evaluates a specific file only if it has not been included before
e. All of the above


27……………
given below is a small php script:

class person{
Function getSal()
{
…..
…..
…..
}
}
Class emp extends person{
funciton GetSal()
{
???
}
}
?>
The getSal() of emp has to behave exactly as getSal() of person .which of the folliwing lines of code would you use to replce the

????
a. perent:: getSal();
b. person:: getSal();
c. parent:: getSal;
d. person:: getSal;







08 January 2012

oDesk Adobe Photoshop CS3 Answers



# Which of the Saving commands is available for an image that is managed by a Version Cue Workspace?

Check In

#Which option will you choose to select all layers of a similar type?

All of the above

# Which of the following Filters cannot be applied to a Smart Object?

Pattern Maker


#With which of the given options does the Signal Strength Meter appear?

It appears when you choose 'merge to hdr command'

#Channels can not be added to which of the following image modes?

Bitmap

# Which among the following Modes does not support layers?

All of the above

# Which of the following is not true about Filters?

None of the above

# Which of the following is not true about the Curves dialog box?

The Curves dialog box lets you adjust up to 14 different points throughout an image's tonal range

#Which of the following Slices is created with the Slice Tool?

User slices

#Which of the following features is supported by the EPS file format?

It supports the Grayscale and Bitmap color modes

#Which among the following blending modes is available only for the Apply Image and Calculations commands?

Both a and b

# What is the use of the Make Work Path command in the Paths palette ?

It can alter the shape of a selection

# Which type of information is not displayed by the Info Palette?

It does not display the opacity of the current layer

# Which among the following is not a right option for selecting a web-safe color from the Color Palette?

Choose Current Color from the Color Palette Menu

# Anti-aliasing option is available for which of the given Tools?

All of the above

#Which of the following options displays the Spot Channels in the Channels palette?

B

#What happens when Use Legacy is selected as shown in the given picture?

It is used to apply proportionate (nonlinear) adjustments to image pixels

# Which option will you select to open the Levels dialog box?

Choose Image > Adjustments > Levels

#Which type of images are resolution-dependent?

Vector images

# Which Liquify Tool is used to reconstruct a part of a distorted image?

A

# In which Format will you save your file to preserve the Alpha channels?

All of the above

# Which of the following is not a kind of text type?

Line type

#Which option will you select to convert Types to Shapes?

Both b and c

# The mask created by the Replace Color command is permanent.

FALSE

#Which of the following Layer properties can be animated?

All of the above

# Which View will you choose to display a Histogram with no controls or statistics?

All of the above

#Which of the given options displays left indent in the Paragraph palette?

B

#Which keyboard shortcut (windows) will you choose to group Layers?

Control + G

#Which among the following QuickTime Video formats is supported by Photoshop extended?

MOV

#The Rotate Canvas command does not work on which of the following

All of the above

#When will the Dynamic shortcuts appear in the Character Palette Menu as shown in the picture?

All of the above

# Hanging Punctuation controls the alignment of the punctuation marks for a specific paragraph.

TRUE

#Which of the following is not a Color Adjustment command?

Adjustment command

# By default, Masks applied to Smart objects are linked to Smart object layers. .

FALSE

#Changing units on the Info Palette automatically changes the units on Rulers.

TRUE

# A working space is an intermediate color space used to define and edit color in Adobe applications.

FALSE

# Which option will you select to remove the existing profile from the document in the given image?

C

# You cannot change the order of the Vector masks or working paths in the Paths palette.

FALSE

#The Color Replacement Tool does not work in which of the following Image modes?

All of the above


# In which of the following Modes can you draw while working with the Shape or Pen tools?

All of the above

#The Out Of Gamut option works only on RGB and Lab images

TRUE

#Which keyboard shortcut (windows) will you choose to close a Path?

None of the above