PHP Intern / Fresher MCQ Test Important Points to Remember. No cell phones or other secondary devices in the room or test area Your desk/table must be clear or any materials except your test-taking device No one else can be in the room with you No talking No dual screens/monitors No use of additional applications or internet 1 / 40 A, P, R, X, S and Z are sitting in a row. S and Z are in the centre. A and P are at the ends. R is sitting to the left of A. Who is to the right of P ? Z A X S 2 / 40 A SELECT command without a WHERE clause returns? All the records from a table, or information about all the records SELECT is invalid without a WHERE clause Nothing All the records from a table that match the previous WHERE clause 3 / 40 He passed the examination in the first class because he…… was working hard for it worked hardly for it had worked hard for it was hard working for it 4 / 40 PHP recognizes constructors by the name. function __construct() function _construct() classname() _construct() 5 / 40 Synonyms: VENT End Past tense of go Opening Stodge 6 / 40 ________ is an open source DBMS product that runs on UNIX, Linux and Windows. MySQL Sun ACCESS JDBC/SQL JSP/SQL 7 / 40 If your object must inherit behavior from a number of sources you must use a/an Interface static class abstract class Object 8 / 40 Which of the following is used to delete an entire MYSQL database? mysql_drop_entiredb mysql_drop_dbas mysql_drop_db mysql_drop_database 9 / 40 Today is Monday. After 61 days, it will be: Thursday Wednesday Tuesday Saturday 10 / 40 What will be the output of the following PHP code? < ?php $color = "maroon"; $var = $color[ 2 ]; echo "$var"; ? > Error r a $var 11 / 40 Which one of the following is the right way to define a constant? constant PI = ’3.1415′; constant PI = “3.1415″; const $PI = “3.1415″; const PI = ’3.1415′; 12 / 40 In php Which method is used to getting browser properties? $_SERVER[ ‘SERVER_NAME’ } $_SERVER[ ‘HTTP_USER_AGENT’ ]; $_SERVER[ ‘PHP_SELF’ ] $_SERVER[ ‘HTTP_VARIENT’ ] 13 / 40 What will be the output of the following PHP code? < ?php $total = "25 students"; $more = 10; $total = $total + $more; echo "$total"; ? > Error 35 25 students 35 students 14 / 40 < b > tag makes the enclosed text bold. What is other tag to make text bold? < dar > < strong > < emp > < black > 15 / 40 Which of the looping statements is/are supported by PHP? i) for loop ii) while loop iii) do-while loop iv) foreach loop All of the mentioned (i), (ii) and (iii) (i) and (ii) None of the mentioned 16 / 40 What will be the output of the following PHP code? < ?php $score = 1234;ET $scoreboard = (array) $score; echo $scoreboard[ 0 ]; ? > 1234 2 Error 1 17 / 40 Which tag is used to display the large font size? < LARGE >< /LARGE > < SIZE >< /SIZE > < BIG >< /BIG > < FONT >< /FONT > 18 / 40 Find the odd man out. 396, 462, 572, 427, 671, 264 264 396 427 671 19 / 40 Code that uses a class, function, or method is often described as the.. object code class code user code client code 20 / 40 Which of the following HTML code is valid? < font color=”red” > < red >< font > All of above are style tags < font colour=”red” > 21 / 40 For defining the possible line break which tag do we have to use in HTML 5? < summary > < wbr > < video > < track > 22 / 40 mysql_connect( ) does not take following parameter password user ID database host database name 23 / 40 Antonyms: ENORMOUS Tiny Soft Weak Average 24 / 40 In a mixture 60 liters, the ratio of milk and water 2:1. If this ratio is to be 1 : 2, then the quantity of water to be further added is: 30 liters 20 liters 40 liters 60 liters 25 / 40 What will be the output of the following < ?php $foo = 'Bob'; $bar = &$foo; $bar = "My name is $bar"; echo $bar; echo $foo; ? > My name is BobMy name is Bob My name is Bob Bob My name is BobBob Error 26 / 40 Which version of PHP introduced the instanceof keyword? PHP 4 PHP 5.3 PHP 6 PHP 5 27 / 40 What are 3 different ways to connect with MySQL? 1. MySQL 2. MySQLI 3. PDO 2,3 1,2,3 None 1 28 / 40 What will be the output of the following php code? < ?php $num = 1; $num1 = 2; print $num . "+". $num1; ? > 1.+.2 1+2 3 Error 29 / 40 Which of following are compound data type? Both Array Objects None 30 / 40 What will be the output of the following PHP code? < ?php $a = 5; $b = 5; echo ($a === $b); ? > 1 5 === 5 Error 31 / 40 Which one of the following statements should be used to include a file? #include ; include‘filename’; @include ‘filename’; #include‘filename’; 32 / 40 What MySQL property is used to create a surrogate key in MySQL? SEQUENCE None of the above UNIQUE AUTO_INCREMENT 33 / 40 What is the correct syntax in HTML for creating a link on a webpage? < A HREF = “mcqsets.html” > < LINK SRC= “mcqsets.html” > < BODY LINK = “mcqsets.html” > < A SRC = “mcqsets.html” > 34 / 40 What does the operator > > > > do? Zero fill right shift Right shift operator Zero fill left shift Left shift operator 35 / 40 In PHP, during error handling include() generates__________ a warning, but the script will continue execution None of the above a fatal error, and the script will stop 36 / 40 A sum of money is to be distributed among A, B, C, D in the proportion of 5 : 2 : 4 : 3. If C gets Rs. 1000 more than D, what is B’s share? Rs. 1500 Rs. 2000 None of these Rs. 500 37 / 40 What least number must be added to 1056, so that the sum is completely divisible by 23 ? 2 18 21 None of these 38 / 40 Pointing to a photograph of a boy Suresh said, “He is the son of the only son of my mother.” How is Suresh related to that boy? Brother Cousin Uncle Father 39 / 40 Which of the following advanced OOP features is/are not supported by PHP? i) Method overloading ii) Multiple Inheritances iii) Namespaces iv) Object Cloning None of the mentioned All of the mentioned i) and ii) iii) and iv) 40 / 40 The left associative dot operator (.) is used in PHP for multiplication separate object and its member delimeter concatenation 0%