Chapter - 5 (Revision Questions)
Chapter - 5 (Revision Questions)
(COMPUTER APPLICATIONS)
c) 3 2) Function Calling
d) many
8) An user defined function declaration
begins with the keyword _______.
a) array
b) function
c) object
d) class
9) In UDF, the function name ends with
_______ brackets.
a) [ ]
b) ( )
c) { }
d) < >
10) The function blocks are given by
_____________.
a) [ ]
b) { }
c) ( )
d) < >
11) The function calling part ends with
__________.
a) , (comma)
b) ; (semicolon)
c) : (colon)
d) . (dot)
12) The __________ part will be executed by
a call to a function.
a) Function Declaration
b) Function Call
c) Both (a) & (b)
d) None of the above
13) The information shared between
function declaration and function calling is
called as:
a) arrays
b) object
c) class
d) parameters
14) The parameters are also called as
_______.
a) arguments
b) function
c) arrays
d) object
15) ______ are the functions with
parameters or arguments.
a) Pre-defined
b) User Defined
c) Parameterized
d) All of the above
16) The function parameters are enclosed
within _____.
a) < >
b) ( )
c) { }
d) [ ]
17) The ________ are mentioned after the
function name and inside the parenthesis.
a) arguments
b) function
c) arrays
d) object
18) How many arguments can be passed to
a function?
a) 2
b) 3
c) 4
d) many
19) The arguments in the function are
separated by ____________.
a) , (comma)
b) ; (semicolon)
c) : (colon)
d) . (dot)
20) For a function to return a value, use the
___________ statement.
a) return
b) call
c) null
d) function
21) _________ is a concept that stores more
than one value of the same data type or
different data type.
a) array
b) function
c) object
d) class
22) How many types of arrays are there in
PHP?
a) 1
1) Indexed Array
b) 2
2) Associative Array
c) 3
3) Multidimensional Array
d) many
23) Array is defined with the keyword
_______.
a) array()
b) function()
c) object()
d) class()
24) The elements in an array are separated
by ____________.
a) , (comma)
b) ; (semicolon)
c) : (colon)
d) . (dot)
25) PHP index array begin with __________.
a) -1
b) 0
c) 1
d) Both a and b
26) __________ arrays are a key-value pair
data structure.
a) Indexed
b) Associative
c) Multidimensional
d) All of the above
27) In which array, we can store the data in a
collection and assign a unique key?
a) Indexed
b) Associative
c) Multidimensional
d) All of the above
28) In Associative array, the key can be of
__________ or _________.
a) Numeric / Float
b) Numeric / String
c) Numeric / Boolean
d) Numeric / Null
29) _________ array contains one or more
arrays.
a) Indexed
b) Associative
c) Multidimensional
d) All of the above
30) _________ array are two, three, four, five,
or more levels deep and difficult to
understand.
a) Indexed
b) Associative
c) Multidimensional
d) All of the above
31) $a=array (34.78, 78.89, 67.78), what is the
index of the value 34.78?
a) 1
b) 2
c) 3
d) 0
32) $a=array(56, 78, 96, 67); $a[3] represents
___________.
a) 96
b) 78
c) 67
d) None
33) Choose the incorrect statement:
a) PHP is an efficiency Language
b) PHP is a platform dependent Language
c) PHP is a security Program Language
d) PHP is flexibility Program Language
34) In PHP, which provides information
hiding?
a) Array
b) Functions
c) Class
d) Object
35) Which of the following statements are
true with related to functions?
a) Functions reduces duplication of code
b) Function decompose complex problems
into simpler pieces
c) Functions improve clarity of code
d) All of the above
36) Which one of the following is the right way of