Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

Zend Technologies 200-530 Exam - Cheat-Test.com

Free 200-530 Sample Questions:

1.You run the following PHP script:
<?php
$name = mysql_real_escape_string($_POST["name"]);
$password = mysql_real_escape_string($_POST["password"]);
?>
What is the use of the mysql_real_escape_string() function in the above script.Each correct answer represents a complete solution. Choose all that apply
A. It escapes all special characters from strings $_POST["name"] and $_POST["password"].
B. It can be used as a countermeasure against a SQL injection attack.
C. It can be used to mitigate a cross site scripting attack.
D. It escapes all special characters from strings $_POST["name"] and $_POST["password "] except ' and ".
Answer: A,B

2.You want to enable compression for every Web page of your Website. Which of the following PHP.ini directives can you set to accomplish the task?Each correct answer represents a complete solution. Choose all that apply.
A. set_compression = on
B. set _compression_level = 9
C. zlib.output_compression_level = 9
D. zlib.output_compression = on
Answer: C,D

3.You run the following PHP script:
<?php
if ( preg_match("/[^a-z589]+/", "AB asdfg589nmGH", $array) ) {
print "<pre>\n";
print_r( $array );
print "</pre>\n";
}
?>
What will be the output?
A.Array
(
[0] => 589
)
B.Array
(
[0] => asdfg589nm
)
C.Array
(
[0] => AB
)
D.Array
(
[0] => AB GH
)
Answer: C

4.You run the following PHP script:
<?php
$array1 = array ('a' => 20, 30, 35);
$array2 = array ('b' => 20, 35, 30);
$array = array_intersect_assoc ($array1, $array2);
var_dump ($array);
?>
What will be the output?
A. array(0) { }
B. The script will throw an error message.
C. array(3) { ["'a'"]=> int(20) [0]=> int(30) [1]=> int(35) }
D. array(1) { ["'a'"]=> int(20)}
Answer: A

5.Which of the following functions can you use to mitigate a command injection attack? Each correct answer represents a complete solution. Choose all that apply.
A. htmlentities()
B. strip_tags()
C. escapeshellcmd()
D. escapeshellarg()
Answer: C,D

6.Which of the following HTML code snippets can be used for the file uploading?
A. <form enctype="text/plain" action="index.php" method="post">
B. <form enctype="application/x-www-form-urlencoded" action="index.php" method="post">
C. <form enctype="multipart/form-data" action="index.php" method="post">
D. <form enctype="plain" action="index.php" method="post">
Answer: C

7.You have the following code in the welcome.html file:
<form action="welcome.php" method="post">
Your Name: <input type="text" name="fname" />
Your Girl Friend Name: <input type="text" name="fname" />
<input type="submit" />
</form>
The PHP code of the welcome.php file is as follows:
Welcome <?php echo $_POST["fname"];?> and <?php echo $_POST["fname"];?>!
What will be the output if you give your name as John and your girlfriend's name as Maria?
A. Welcome John and Maria!
B. Welcome Maria and John!
C. The script will return an error.
D. Welcome Maria and Maria!
E. Welcome John and John!
Answer: D

8.Consider the following PHP script:
<?php
$a = array(
1 => 'php',
'Hypertext',
'Preprocessor',
'widely used' => array(
'general' => 'purpose',
'scripting' => 'language',
'that' => 'was',
'originally' => array(
5 => 'designed',
9 => 'for',
'Web development',
4 => 'purpose',)));
//write code here
?>
What should you write here to print the value 'Web development'?
A. Answer Pending
Answer: A

9.John works as a Web site Developer for PHPWEB Inc. He uses the Windows operating system and works on PHP engine 5.0. He develops the following script:
<?php
gmmktime(0, 0, 0, 1, 1, 1970);
?>
What will be the output of the above PHP script in case of countries east of GMT?
A.fatal error
B.1
C.-1
D.0
Answer: C

10.You want to fetch the top level domain (com) from the email john@ucertify.com. Which of the following functions will you use to accomplish the task?
A. substr("john@ucertify.com", strpos("john@ucertify.com", ".")) ;
B. eregi("^[a-z0-9\._-]+"."@"."([a-z0-9][a-z0-9-]*[a-z0-9]\.)+"."([a-z]+\.)?"."([a-z]+)$",
john@ucertify.com))
C. eregi("john@ucertify.com", ".");
D. substr("john@ucertify.com", strpos("john@ucertify.com", ".")+1);
Answer: D

11.Consider the following XML file:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> SimpleXML Example</title>
</head>
<body>
<h1>
Please go <a href="http://www.ucertify.com">http://www.ucertify.com</a>
<br/>
</h1>
</body>
</html>
Which of the following statements will display the HREF attribute on the anchor tag if the SimpleXML
object is $sxml?
A. $sxml->body->h1->a->href
B. $sxml->h1->a->href
C. $sxml->body->h1->a['href']
D. $sxml->body->h1->a<href>
Answer: C

12.Consider a string in the following format:
a*bcd/a.d
You want to perform regular expression in this string; however, you are unable to do this since the string contains special characters. You can make this string PCRE compatible if you convert this string in the following format:
a\*bcd\/a\.d
Which of the following functions will you use to acco mplish the task into a single call?
A. preg_quote()
B. preg_match()
C. expload()
D. preg_split()
Answer: A

13.Which of the following PHP file handling functions will you use if you want to retrieve only the texts from an HTML file and leave all HTML and PHP tags?
A. fgets()
B. file_get_contents()
C. fgetss()
D. file_put_contents()
Answer: C

14.You have created a table based on the following data:
EmpID NUMBER (5) PRIMARY KEY
EmpName VARCHAR2 (35) NOT NULL
Salary NUMBER (9, 2) NOT NULL
Commission NUMBER (4, 2)
ManagerName VARCHAR2 (25)
ManagerID NUMBER (5)
Now, you want to display the names of employees and their managers, using a self join. Which of the following SQL statements can you use to accomplish this? Each correct answer represe nts a complete solution. Choose two.
A. SELECT e.EmpName, m.ManagerName FROM Employees e SELF JOIN Employees m ON e.EmpID
=
m.ManagerID;
B. SELECT e.EmpName, m.ManagerName FROM Employees e INNER JOIN Employees m
ON e.EmpID = m.ManagerID;
C. SELECT e.EmpName, m.ManagerName
FROM Employees e LEFT OUTER JOIN Employees m ON e.EmpID = m.ManagerID;
D. SELECT e.EmpName, m.ManagerName FROM Employees e, Employees m WHERE e.EmpID =
m.ManagerID;
Answer: B,D

15.Which of the following directives can be used t o improve the security while using the shared hosting environment?Each correct answer represents a complete solution. Choose all that apply.
A. shared_host
B. disable_classes
C. safe_mode
D. open_basedir
E. disable_functions
Answer: B,C,D,E

16.You have been given the following code snippet:
<?php
$string = <<<XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<email>
<to>jenny@ucertify.com</to>
<from>john@ucertify.com</from>
<heading>Technical issue in Linux OS</heading>
<body>There is a technical issue in my Linux system. Please Fix it. </body>
</email>
XML;
<Write code here>
?>
Which of the following code snippets will you write to print the XML content?
A. $xml = XML_string($string);
print_r($xml);
B. $xml = simplexml_load_string($string);
print_r($xml);
C. $xml = load_XML($string);
print_r($xml);
D. $xml = simplexml_string($string);
print_r($xml);
Answer: B

17.Consider the following PHP script:
1. <?php
2. $charlist = array (
3. 'a' => 'one',
4. 'b' => 'two',
5. );
6. ***************
7. ?>
What statement will you write at line number 6 instead of ***** to get the output onectwo?
A. echo strtok ('acb', $charlist);
B. echo strstr ('acb', $charlist);
C. echo strtr ('acb', $charlist);
D. echo strip_tags('acb', $charlist);
Answer: C

18.You run the following PHP script:
<?php
$array1 = array ("a", "b", "c", "d", "e", "f");
$array2 = array_slice($array1, -3);
foreach ( $array2 as $val ) {
print "$val ";
}
?>
What will be the output?
A. b c d
B. d e f
C. c d e
D. a b c
Answer: B

19.Given a table created as shown below:
create table foo (c1 int, c2 int, c3 int, c4 char(10))
If column c1 has a cardinality of 10, column c2 has a cardinality of 5000, and column c3 has a cardinality of 5000000, which of the following indexes would optimize the following statement?
Select c1,c2,c3 from foo where c1=100 and c2= 100 and c3 = 100
A. create index foox on foo (c1,c2,c3)
B. create index foox on foo (c2,c1,c3)
C. create index foox on foo (c3,c2,c1)
D. create index foox on foo (c3,c1,c2)
Answer: C

20.A table named employees is given below:
Which of the following statements would return the employees names, in ascending order, based on their last name and first name? Each correct answer represents a complete solut ion. Choose all that apply.
A. select fname, lname from employees order by lname;
B. select fname, lname from employees order by lname asc;
C. select fname, lname from employees group by lname;
D. select fname, lname from employees order by lname desc;
Answer: A,B

21.Consider the following code:
<?php
$x=0;
$i;
for($i=0;$i<5;$i++)
{
$x+=$i;
}
print($x)
?>
What will be the value of x?
A. 10
B. 9
C. 7
D. 8
Answer: A

22.Which of the following functions will you use to break a string int o an array based on a specific pattern? Each correct answer represents a complete solution. Choose all that apply.
A. preg_split()
B. explode()
C. strstr()
D. implode()
Answer: A,B

23.What will be the output of the following code snippet?
<?php
$input = array(4, "4", "3", 4, 3, "3", 3, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7);
echo count(array_unique($input));
?>
A. 19
B. 6
C. 4
D. The script will throw an error message
Answer: C

24.In which of the following ways will you send data from a Web page if you do not know how data is sent?
A. $_REQUEST[]
B. $_POST[]
C. $_GET[]
D. $_SEND[]
Answer: A

25.Maria writes a query that uses outer join between two tables. Which of the following operators are not allowed in the query? Each correct answer represents a complete solution. Choose two.
A. IN
B. =
C. OR
D. AND
Answer: A,D

26.You want to create an anonymous function in the middle of a script that will return the square of a given number. Which of the following PHP scripts can you use to accomplish the task? Each correct answer represents a complete solution. Choose two.
A. <?php
$foo = create_function("$x", "return $x*$x;");
echo $foo(10);
?>
B. <?php
$foo = create_function('$x', 'return $x*$x;');
echo $foo(10);
?>
C. <?php
$foo = create_function("\$x", "return \$x*\$x;");
echo $foo(10);
?>
D. <?php
$foo = create_function("$x", "$x*$x;");
echo $foo(10);
?>
Answer: B,C

27.You have to select persons whose age is between twenty -five and forty from a database named HumanResource. Which of the following criteria will you use in the query to accomplish the task?
A. BETWEEN 25 - 40
B. BETWEEN 25 TO 40
C. BETWEEN 25 AND 40
D. BETWEEN 25 & 40
Answer: C

28.You want to search for such users who have not used any digit in th eir user names to register to your Website. Which of the following regular expressions will you use to accomplish the task?
A. [[:digit:]^]
B. [^[:digit:]]
C. ^[[:digit]]
D. [[:digit:^]]
Answer: B

29.Which of the following metacharacters can be use d to find a non-word character?
A. .
B. \W
C. \w
D. \d
Answer: B

30.Fill in the Blank with the appropriate method name.
The______is used to import the SimpleXML objects for use with DOM
A.The dom_import_simplexml() is used to import the SimpleXML objects for use with DOM.
Answer: A


© 2014 Cheat-Test.com, All Rights Reserved