New ! Computer Applications MCQ Practise Tests



PHP Function and Array Book Back Questions

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Applications

Time : 00:45:00 Hrs
Total Marks : 30
    5 x 1 = 5
  1. Which one of the following is the right way of defining a function in PHP?

    (a)

    function { function body }

    (b)

    data type functionName(parameters) { function body }

    (c)

    functionName(parameters) { function body }

    (d)

    function fumctionName(parameters) { function body }

  2. A function in PHP starts with __ 

    (a)

    Function

    (b)

    __def

    (c)

    def

    (d)

    function

  3. What will be the output of the following PHP code?
    < ?php
    \($\)a=array(“A”,”Cat”,”Dog”,”A”,”Dog”);
    \($\)b=array(“A”,”A”,”Cat”,”A”,”Tiger”);
    \($\)c=array_combine(\($\)a,\($\)b);
    print_r(array_count_values(\($\)c));
    ? >

    (a)

    Array ( [A] = > 5 [Cat] = > 2 [Dog] = > 2 [Tiger] = > 1 )

    (b)

    Array ( [A] = > 2 [Cat] = > 2 [Dog] = > 1 [Tiger] = > 1 )

    (c)

    Array ( [A] = > 6 [Cat] = > 1 [Dog] = > 2 [Tiger] = > 1 )

    (d)

    None of these

  4. For finding non empty elements in array we use

    (a)

    is_array ( ) function

    (b)

    size of ( ) function

    (c)

    array_count ( ) function

    (d)

    array_count ( ) function

  5. Indices of arrays can be either strings or numbers and they are denoted as

    (a)

    $my_array {4}

    (b)

    $my_array [4]

    (c)

    $my_array | 4 |

    (d)

    None of them

  6. 3 x 2 = 6
  7. Define Function in PHP.

  8. What is the syntax for defining a function in PHP?

  9. Write array Syntax in PHP

  10. 3 x 3 = 9
  11. Write the features of built-in Functions.

  12. Differentiate user defined and system defined Functions.

  13. Differentiate Associate array and Multidimensional array.

  14. 2 x 5 = 10
  15. Explain Function concepts in PHP.

  16. Explain Array concepts and their types.

*****************************************

Reviews & Comments about 12th Standard Computer Applications - PHP Function and Array Book Back Questions

Write your Comment