• 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 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/>$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/>$fruits = array ("apple", "mango", "peach", "pear", "orange");<br/>$subset = array_slice ($fruits, 2);<br/>print_r ($subset);

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/>$result = array_flip($a1);<br/>print_r($result);

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code ?<br/>$city_west = array("NYC", "London");<br/>$city_east = array("Mumbai", "Beijing");<br/>print_r(array_replace($city_west, $city_east));

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$names = array("Sam", "Bob", "Jack");<br/>echo $names[0] . "is the brother of " . $names[1] . " and " . $names[1] . ".".$brother;

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$number = array ("4", "hello", 2);<br/>echo (array_sum ($number));

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 function computes the difference of arrays?

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$a = array("A", "Cat", "Dog", "A", "Dog");<br/>print_r(array_count_values($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
↑