1. Question: fgets() is used to read a file one line at a time.

    A
    true

    B
    false

    Note: Not available
    1. Report
  2. Question: <?php     $grades = array(42, "hello", 42);     $total = array_sum($grades);     print $total; ?> This returns the following:

    A
    48

    B
    84

    C
    44

    D
    42 hello 42

    Note: Not available
    1. Report
  3. Question: $color = "Green"; $number = 10; $age = 10; $sum = 10 + "19"; Output?

    A
    29

    B
    10101019

    C
    10+19

    D
    Green;10;10;10+19

    Note: Not available
    1. Report
  4. Question: $x = 4; function assignx () { $x = 0; printf("$x inside function is %d", $x); } assignx(); printf("$x outside of function is %d", $x); Executing this listing results in the following:

    A
    $x inside function is 0 $x outside of function is 4

    B
    $x inside function is null $x outside of function is null

    C
    $x inside function is 04 $x outside of function is 40

    D
    none

    Note: Not available
    1. Report
  5. Question: $somevar = 15; function addit() { $GLOBALS["somevar"]++; } addit(); echo "Somevar is ".$GLOBALS["somevar"]; This returns the following

    A
    Somevar is 16

    B
    Somevar is 15

    C
    Somevar is 16 Somevar is 17 Somevar is 18 Somevar is 19 Somevar is 20 . . .

    D
    16 Somevar is 16

    Note: Not available
    1. Report
  6. Question: 
    printf("The value of Pi is %f", PI);
    $pi2 = 2 * PI + 2 - 8;
    printf("Pi doubled equals %f", $pi2);
    This code produces the following results:

    A
    The value of pi is 3.141592 Pi doubled equals 0.283184

    B
    The value of pi is 3.141592. Pi doubled equals 6.283184.

    C
    The value of pi is 3.141592. Pi doubled equals 8.283184.

    D
    The value of pi is 3.141592. Pi doubled equals 6.283184 + 2 - 8.

    Note: Not available
    1. Report
  7. Question: <?php $output = "This is one line.\nAnd this is another line."; echo $output; ?> This returns the following

    A
    This is one line. And this is another line.

    B
    This is one line.\nAnd this is another line.

    C
    This is one line.And this is another line.

    D
    This is one line. \n And this is another line.

    Note: Not available
    1. Report
  8. Question: $state["Delaware"]="December 7, 1787"; $state["Pennsylvania"]="December 12, 1787"; $state["New Jersay"]="December 18,1787"; $keys=array_keys($state); print_r($keys); Which of the following is/are correct output for above Statement ?

    A
    Array ( [0] => Delaware [1] => Pennsylvania [2] => New Jersey )

    B
    Array ( [1] => Delaware [2] => Pennsylvania [3] => New Jersey )

    C
    array_keys($state); ["Delaware"] = "December 7, 1787";

    D
    $state["Delaware"] = "December 7, 1787";

    Note: Not available
    1. Report
  9. Question: 
    $population=array("Ohio"=>"11,421,267","Iowa"=>"2,936,760");
    print_r(array_values($population));
    Which of the following is/are correct output for above Statement ?

    A
    Array ( [0] => 11,421,267 [1] => 2,936,760 )

    B
    Array values ( [0] => 11,421,267 [1] => 2,936,760 )

    C
    array("Ohio" => "11,421,267", "Iowa" => "2,936,760");

    D
    array values("Ohio" => "11,421,267", "Iowa" => "2,936,760");

    Note: Not available
    1. Report
  10. Question: skip this question

    A
    Delaware was founded on December 7.

    B
    Pennsylvania was founded on March 1.

    C
    Ohio was founded on December 7.

    D
    Delaware was founded on December 7

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd