0% found this document useful (0 votes)
54 views40 pages

Chapter - 5 (Revision Questions)

This document contains 37 multiple choice questions about computer programming concepts in PHP like functions, arrays, and object-oriented programming. Some key points covered are: - There are 3 types of functions in PHP: predefined, user-defined, and parameterized. - Arrays can be indexed, associative, or multidimensional and allow storing multiple values. - Functions break programs into reusable blocks of code, improve clarity, and reduce duplication. - Object-oriented concepts like classes provide information hiding in PHP programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views40 pages

Chapter - 5 (Revision Questions)

This document contains 37 multiple choice questions about computer programming concepts in PHP like functions, arrays, and object-oriented programming. Some key points covered are: - There are 3 types of functions in PHP: predefined, user-defined, and parameterized. - Arrays can be indexed, associative, or multidimensional and allow storing multiple values. - Functions break programs into reusable blocks of code, improve clarity, and reduce duplication. - Object-oriented concepts like classes provide information hiding in PHP programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

XII STD B1

(COMPUTER APPLICATIONS)

K. NOOR AHAMED, M.C.A.,


(COMPUTER INSTRUCTOR)
CHAPTER – 5
REVISION QUESTIONS
1) A block of segment in a program that
performs a specific operations tasks is
called as:
a) Arrays
b) Functions
c) Segments
d) Procedure
2) A _________ is a type of sub routine or
procedure in a program.
a) Array
b) Function
c) Segment
d) Procedure
3) How many types of functions are there in
PHP?
a) 1 1) Pre Defined / System / Built-in Function

b) 2 2) User Defined Function (UDF)


3) Parameterized Function
c) 3
d) many
4) A function in PHP which starts with
underscore is called as ____________.
a) Predefined Function
b) System Defined Function
c) Built-in Function
d) All of the above
5) PHP has over __________ built-in
functions to perform different tasks.
a) 500
b) 600
c) 700
d) 800
6) _________ function in PHP gives a
privilege to user to write their own specific
operation.
a) Pre-defined
b) User Defined
c) Parameterized
d) All of the above
7) How many important steps are there to
create an user defined function?
a) 1
b) 2 1) Function Declaration

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

defining a function in PHP?

a) function { function body }

b) data type functionName (parameters) { function body }

c) functionName (parameters) { function body }

d) function functionName (parameters) { function body }


37) A function in PHP which starts with __
(double underscore) is known as …………
a) Magic Function
b) Built-in Function
c) Default Function
d) User Defined Function

You might also like