Honeywell Previous Years Solved Sample Placement Papers
- A PHP script should start with ___ and end with ___:
A. <php>
B. <? php ?>
C. <? ?>
D. <?php ?>
Answer: D - Which of the looping statements is/are supported by PHP?
i) for loop
ii) while loop
iii) do-while loop
iv) foreach loop
A. (i) and (ii)
B. (i), (ii) and (iii)
C. All of the mentioned
D. None of the mentioned
Answer: C - Which of the following is/are a PHP code editor?
i) Notepad
ii) Notepad++
iii) Adobe Dreamweaver
iv) PDT
A. Only (iv)
B. All of the mentioned
C. (i), (ii) and (iii)
D. Only (iii)
Answer: B - Which of the following must be installed on your computer to run PHP script?
i) Adobe Dreamweaver
ii) PHP
iii) Apache
iv) IIS
A. All of the mentioned
B. Only (ii)
C. (ii) and (iii)
D. (ii), (iii) and (iv)
Answer: D - We can use ___ to comment a single line?
i) /?
ii) //
iii) #
iv) /* */
A. Only (ii)
B. (i), (iii) and (iv)
C. (ii), (iii) and (iv)
D. Both (ii) and (iv)
Answer: C - Which of the below symbols is a newline character?
A. \r
B. \n
C. /n
D. /r
Answer: B - Which of the following PHP statement/statements will store 111 in variable num?
i) int $num = 111;
ii) int mum = 111;
iii) $num = 111;
iv) 111 = $num;
A. Both (i) and (ii)
B. All of the mentioned
C. Only (iii)
D. Only (i)
Answer: C - What will be the output of the following PHP code?
<?php
$num = 1;
$num1 = 2;
print $num . "+" . $num1 ;
?>
A. 3
B. 1+2
C. 1.+.2
D. Error
Answer: B - What will be the output of the following PHP code?
<?php
$num = "1";
$num1 = "2";
print $num + $num1 ;
?>
A. 3
B. 1+2
C. Error
D. 12
Answer: A - Which of the following variables can be assigned a value to it?
i) $3hello
ii) $_hello
iii) $this
iv) $This
A. All of the mentioned
B. Only (ii)
C. (ii), (iii) and (iv)
D. (ii) and (iv)
Answer: D