Ubinetics Previous Years Solved Sample Placement Papers
-
Which of the following is a PHP resource?
A. Domxml document
B. Odbc link
C. File
D. All of the above Answer: Option D
-
In multidimensional arrays rather than a single key the values are stored in:
A. Sequence of key values Answer: Option A
B. 2 keys
C. Linear style
D. None of them
-
PHP arrays are also called as:
A. Vector arrays
B. Perl arrays
C. Hashes Answer: Option C
D. All of them
-
In vector arrays the elements must have:
A. Same size
B. Same type Answer: Option B
C. Different size
D. Different type
-
As compared to associative arrays, vector arrays are much:
A. Faster Answer: Option A
B. Slower
C. Stable
D. None of them
-
When you use the $_POST variable to collect data, the data is visible to:
A. None
B. Only you Answer: Option B
C. Everyone
D. Selected few
-
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)
-
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()
-
Which of the following is the correct use of the strcmp() function in PHP?
A. The strcmp() function is used to compare the strings excluding case
B. The strcmp() function is used to compare the uppercase strings
C. The strcmp() function is used to compare the lowercase strings
D. The strcmp() function is used to compare the strings including case Answer: Option D
-
What will be the output of the following PHP program?
A. 6 Answer: Option A
B. 5
C. 4
D. 3
-
Explanation: The function
count()
will return the number of elements in an array. The parameter 1 counts the array recursively, i.e., it will count all the elements of multidimensional arrays. -
What will be the output of the following PHP program?
A. Correct Answer
B. Is The
C. I Wonder
D. Which One Answer: Option D
-
Explanation: The
stripos()
function finds the position of the first occurrence of a string inside another string. In this case, it returns 7. -
Which of the following PHP functions can be used for generating unique ids?
A. md5()
B. uniqueid() Answer: Option B
C. mdid()
D. id()
-
Explanation: The function
uniqueid()
is used to generate a unique ID based on the microtime (current time in microseconds). The ID generated from the functionuniqueid()
is not optimal, as it is based on the system time. To generate an ID which is extremely difficult to predict, we can use themd5()
function.