Honeywell Previous Years Solved Sample Placement Papers
- Which of the following method sends input to a script via a URL?
A.Get
B.Post
C.Both
D.None
Answer: Option A - Which of the following function returns a text in title case from a variable?
A.ucwords($var)
B.upper($var)
C.toupper($var)
D.ucword($var)
Answer: Option A - Which of the following function returns the number of characters in a string variable?
A.count($variable)
B.len($variable)
C.strcount($variable)
D.strlen($variable)
Answer: Option D - Which of the following are not considered as Boolean false?
a. FALSE
b. 0
c. “0”
d. “FALSE”
e. 1
f. NULL
Ans: d and e - What is the output of the following code?
a. Array ([x]=>9 [y]=>3 [z]=>-7)
b. Array ([x]=>3 [y]=>2 [z]=>5)
c. Array ([x]=>12 [y]=>5 [z]=>-2)
d. Error
e. None of the above
Ans: c - Which of the following multithreaded servers allow PHP as a plug-in?
a. Netscape FastTrack
b. Microsoft’s Internet Information Server
c. O’Reilly’s WebSite Pro
d. All of the above
Ans: d - Which of the following type cast is not correct?
a. real
b. double
c. decimal
d. boolean
Ans: c - Which of the following are the valid PHP data types?
a. resource
b. null
c. boolean
d). All of the above
Ans: d - Which of the following characters are taken care of by htmlspecialchars?
a. <
b. >
c. single quote
d. double quote
e. &
f. All of the above
Ans: f - Which of the following is a correct declaration?
a. static $varb = array(1,’val’,3);
b. static $varb = 1+(2*90);
c. static $varb = sqrt(81);
d. static $varb = new Object;
Ans: a - Which of the following is Ternary Operator?
a. &
b. =
c. ?:
d. +=
Ans: c - Which of the following pair have non-associative equal precedence?
a. +,-
b. ==, !=
c. +, /
d. &=, |=
Ans: b - Which of the following functions output text?
a. echo()
b. print()
c. both a, b
d. display()
Ans: c - Which of the following statement is not correct for PHP?
a. It is a server side scripting language
b. A PHP file may contain text, html tags or scripts
c. It can run on windows and Linux systems only
d. It is compatible with most of the common servers used today
Ans: c - Which of the following printing construct/function accepts multiple parameters?
a. echo
b. print
c. printf
d. All of the above
Ans: a - What will be the output of the following code?
$a = 10;
if ($a > 5 OR < 15)
echo ‘true’;
else
echo ‘false’;
a. true
b. false
c. No output
d. Parse Error
Ans: d