Novartis Previous Years Solved Sample Placement Papers
-
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. Ans: B
C. (i), (ii) and (iii)
D. Only (iii)
-
Which of the following must be installed on your computer so as 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) Ans: 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) Ans: C
D. Both (ii) and (iv)
-
Which of the below symbols is a newline character?
A. \r
B. \n Ans: B
C. /n
D. /r
-
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) Ans: C
D. Only (i)
-
What will be the output of the following PHP code?
A. 3
B. 1+2 Ans: B
C. 1.+.2
D. Error
-
What will be the output of the following PHP code?
A. 3 Ans: A
B. 1+2
C. Error
D. 12
-
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) Ans: D
-
What will be the output of the following code?
A. Error
B. My name is BobBob
C. My name is BobMy name is Bob
D. My name is Bob Bob Ans: D
-
PHP’s numerically indexed array begin with position __.
A. 1
B. 2
C. 0 Ans: C
D. -1
-
Which of the functions is used to sort an array in descending order?
A. sort()
B. asort()
C. rsort() Ans: C
D. dsort()