• HOME
  • QUIZ
  • CONTACT US
EXAMIANS
  • COMPUTER
  • CURRENT AFFAIRS
  • ENGINEERING
    • Chemical Engineering
    • Civil Engineering
    • Computer Engineering
    • Electrical Engineering
    • Mechanical Engineering
  • ENGLISH GRAMMAR
  • GK
  • GUJARATI MCQ

PHP ARRAYS QUIZ

What will be the output of the following PHP code?<br/>$fruits = array ("mango", "apple", "peach", "pear");<br/>$fruits = asort ($fruits);<br/>printr ($fruits);

TRUE ANSWER : ?
YOUR ANSWER : ?

What functions count elements in an array?<br/>1. count<br/>2. Sizeof<br/>3. Array_Count<br/>4. Count_array

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");<br/>$a2 = array("e" => "red", "f" => "green", "g" => "blue", "h" => "orange");<br/>$a3 = array("i" => "orange");<br/>$a4 = array_combine($a2, $a3);<br/>$result = array_diff($a4, $a2);<br/>print_r($result);

TRUE ANSWER : ?
YOUR ANSWER : ?

What will the following script output?<br/>$array = array (1, 2, 3, 5, 8, 13, 21, 34, 55);<br/>$sum = 0;<br/>for ($i = 0; $i < 5; $i++) {<br/>$sum += $array[$array[$i]];<br/>}<br/>echo $sum;

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$fname = array("Peter", "Ben", "Joe");<br/>$age = array("35", "37", "43");<br/>$c = array_combine($fname, $age);<br/>print_r($c);

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$cars = array("Volvo", "BMW", "Toyota");<br/>echo "I like " . $cars[2] . ", " . $cars[1] . " and " . $cars[0] . ".";

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code ?<br/>$array = array("red", "green");<br/>array_push($array, "blue", "yellow");<br/>print_r($array);

TRUE ANSWER : ?
YOUR ANSWER : ?

Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use?

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code ?<br/>$people = array("Peter", "Susan", "Edmund", "Lucy");<br/>echo pos($people);

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code ?<br/>$a = array("a" => "Jaguar", "b" => "Land Rover", "c" => "Audi", "d" => "Maseratti");<br/>echo array_search("Audi", $a);

TRUE ANSWER : ?
YOUR ANSWER : ?
MORE MCQ

QUIZ STATS

  • 0
  • 0

DOWNLOAD APP

  • APPLE
    from app store
  • ANDROID
    from play store

SEARCH

LOGIN HERE


  • GOOGLE

FIND US

  • 1.70K
    FOLLOW US
  • EXAMIANSSTUDY FOR YOUR DREAMS.
  • SUPPORT :SUPPORT EMAIL ACCOUNT : examians@yahoo.com

OTHER WEBSITES

  • GUJARATI MCQ
  • ACCOUNTIANS

QUICK LINKS

  • HOME
  • QUIZ
  • PRIVACY POLICY
  • DISCLAIMER
  • TERMS & CONDITIONS
  • CONTACT US
↑