New ! Computer Applications MCQ Practise Tests



12th Standard Computer Applications PHP Function and Array English Medium Free Online Test One Mark Questions 2020 - 2021

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Applications

Time : 00:10:00 Hrs
Total Marks : 10

    Answer all the questions

    10 x 1 = 10
  1. A function in PHP starts with __ 

    (a)

    Function

    (b)

    __def

    (c)

    def

    (d)

    function

  2. PHP’s numerically indexed array begin with position ___________________.

    (a)

    1

    (b)

    2

    (c)

    0

    (d)

    -1

  3. Which of the following are correct ways of creating an array?
    i) state[0] = “Tamilnadu”;
    ii) \($\)state[] = array(“Tamilnadu”);
    iii) \($\)state[0] = “Tamilnadu”;
    iv) \($\)state = array(“Tamilnadu”);

    (a)

    iii) and iv)

    (b)

    ii) and iii)

    (c)

    Only i)

    (d)

    ii), iii) and iv)

  4. 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

  5. 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

  6. PHP arrays are also called as

    (a)

    Vector arrays

    (b)

    Perl arrays

    (c)

    Hashes

    (d)

    All of them

  7. What functions count elements in an array?

    (a)

    count

    (b)

    Size of

    (c)

    Array_Count

    (d)

    Count_array

     

  8. A Function is a type of___________.

    (a)

    sub routine

    (b)

    procedure

    (c)

    Either a or b

    (d)

    None of these

  9. ______ stores more than one value of same data type in single array variable.

    (a)

    Arrays

    (b)

    Function

    (c)

    Indexed array

    (d)

    Multidimensional array

  10. __________ arrays are a key-value pair data structure.

    (a)

    Associative

    (b)

    Indexed

    (c)

    Multi-dimensional

    (d)

    All of these

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

Reviews & Comments about 12th Standard Computer Applications PHP Function and Array English Medium Free Online Test One Mark Questions 2020 - 2021

Write your Comment