12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications மின்னணு தரவு பரிமாற்றம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிக பாதுகாப்பு அமைப்புகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின்னணு செலுத்தல் முறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications திறந்த மூல கருத்துருக்கள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு வடமிடல் Sample Question Papers Study Material - QB365 Set A

Published on: 09/10/2019
PHP Function and Array
Download Tamil Nadu 12th Standard Computer Applications question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Applications Test

1.
A _________ array is an array containing one or more arrays.
Associative
Indexed
Multi-dimensional
All of these
2.
__________ arrays are a key-value pair data structure.
Associative
Indexed
Multi-dimensional
All of these
3.
A Function is a type of___________.
sub routine
procedure
Either a or b
None of these
4.
A block of segment in a program that performs a specific operation tasks is known as
Arrays
Segments
Functions
All of these
5.
What functions count elements in an array?
count
Size of
Array_Count
Count_array
6.
As compared to associative arrays vector arrays are much
Faster
Slower
Stable
None of them
7.
Indices of arrays can be either strings or numbers and they are denoted as
$my_array {4}
$my_array [4]
$my_array | 4 |
None of them
8.
For finding non empty elements in array we use
is_array ( ) function
size of ( ) function
array_count ( ) function
array_count ( ) function
9.
A function in PHP starts with __
Function
__def
def
function
10.
Which one of the following is the right way of defining a function in PHP?
function { function body }
data type functionName(parameters) { function body }
functionName(parameters) { function body }
function fumctionName(parameters) { function body }
11.
Define function calling?
12.
What is Multi-Dimensional Array?
13.
What is associative array?
14.
Write array Syntax in PHP
15.
Define associative array.
16.
Usage of Array in PHP.
17.
What is parameterized Function?
18.
Define Function in PHP.
19.
Write the advantages of functions.
20.
Differentiate Associate array and Multidimensional array.
21.
Differentiate user defined and system defined Functions.
22.
Write the features of built-in Functions.
23.
What is the syntax for defining a function in PHP?
24.
Explain the Multidimensional Array.
25.
Explain Function concepts in PHP.
26.
Array defines with the keyword___________.
27.
The parameter is also called as __________.
28.
A user-defined Function declaration begins with the keyword __________
29.
PHP functions are dived into _____ types.
30.
PHP has over _________ functions built in that perform different tasks.
31.
Pre defined function
32.
Parameterized function
33.
Multidimensional Arrays
34.
Associative Arrays
35.
Indexed Arrays
1.
(c)
Multi-dimensional
2.
(b)
Indexed
3.
(c)
Either a or b
4.
(c)
Functions
5.
(a)
count
6.
(b)
Slower
7.
(d)
None of them
8.
(b)
size of ( ) function
9.
(a)
Function
10.
(d)
function fumctionName(parameters) { function body }
11.
A function declaration part will be executed by a call to the function. Programmer has to create Function Calling part inside the respective program.
SYNTAX:
function Name ( );
12.
A multidimensional array is an array containing one or more arrays.
13.
Associative arrays are arrays that use named keys that you assign to them.
14.
array(key= >value,key= >value,key= >value,etc.);
key = Specifies the key (numeric or string value = Specifies the value
15.
Associative arrays are a key-value pair data structure.
Syntax:
array (key⇒ value, key ⇒ value, etc);
key ⇒ Specifies the key (numeric or string)
value ⇒ Specifies the value
16.
1. The array() function is used to create an array.
2. In PHP,there are three types of arrays:
i). Indexed arrays - Arrays with numeric index
ii). Associative arrays - Arrays with named keys
iii). Multidimensional arrays - Arrays containing one or more arrays
17.
(i) Values can be passed from one function to another function thru parameters.
(ii) The parameter is also called as arguments, it is like variables.
(iii) The arguments are mentioned after the function name and inside of the parenthesis.
18.
A function is a type of sub routine or procedure in a program. A function will be executed by a call to the function and the function returns any data type values or NULL. value to the called function in the part of respective program.
19.
1. Reducing duplication of code
2. Decomposing complex problems into simpler pieces
3. Improving clarity of the code
4. Reuse of code
5. Information hiding
20.
| Associate array | Multidimensional array |
|---|---|
| Associative arrays are arrays that use named keys that you assign to them. | An array containing one or more arrays. |
| It storing data in a liner | Multi-dimensional arrays that are two, three, four, five, or more levels deep. |
| We can associate the name with each array element in PHP using = > symbol. | It can be represented in the form of a matrix which is represented by row * column. |
21.
| User defined Functions | System define Functions |
|---|---|
| (i) Functions are provided by the user. (ie) we can create own functions. | (i) Built-in function are functions that exist in PHP installation package. |
| (ii) Example function insertMsg() { echo "Helo world" } insertMsg(); |
(ii) Example rename_function() |
22.
1. PHP has more than 700 built-in functions that perform different tasks.
2. It exists in PHP installation package.
3. It is reusable piece
4. It can either return values when called or can simply perform an operation without returning any value.
23.
Syntax
function functionName([parameter list])
{
// code to be executed
}
24.
Multidimensional Arrays:
Array containing one or more arrays is called multidimensional array. PHP accepts array with two, three four or more levels.
Example:
// A two-dimensional array
$student=array
(
array("Iniyan", 100, 96),
array("Kavin", 60, 59),
array("Nilani", 1313, 139)
);
echo $$student [0][0].": Tamil Mark: ".$student [0][1].". English mark: ".$student [0] [2]."< br >";
echo $$student [1][0].": Tamil Mark: ".$student [1][1].". English mark: ".$student [1] [2]."< br >";
echo $$student [2}[0].": Tamil Mark:".$student [2][1].".English mark: ".$student [2] [2]."< br >
? >
25.
Function in PHP:
A block of segment in a program that performs a specific operation such as Insert, Execute, Delete, Calculate etc.
A function is a type of sub-routine or procedure in a program.
The function can be divided into three types as follows.
(i) User defined Function
(ii) Pre-defined or System defined or Built-in Function
(iii) Parameterized Function
(i) User defined Function
PHP gives a privilege to user to write own specific operation inside of existing program module.
Two important steps the programmer has to create for users defined functions are
(a) Function Declaration
(b) Function Calling
(a) Function Declaration
A user defined function declaration begins with the keyword "Function".
User can write any custom logic inside in function block.
Syntax:
function functionName()
{
custom logic code to be executed;
}
(b) Function Calling
A function declaration part will be executed by a call to the function.
Programmer has to create function calling part inside the respective program.
Syntax:
functionName();
(ii) Pre-defined or System defined or built-in Function
Built-in functions are functions that exist in PHP installation package.
Functions can either return values when called or can simply perform an operation without returning any value.
Example:
rename_function()
This function renames original name to new name.
Parameter is also called as arguments just like variables.
Arguments are mentioned after the function name and inside the parenthesis.
There is no limit for sending arguments, just separate them with a comma notation.
Examples :
Parameterized function with one argument, two arguments respectively.
(i) function School Name ($sname)
(ii) function School Name ($sname, $strength)
26.
( )
array ( )
27.
( )
arguments
28.
( )
function
29.
( )
three
30.
( )
700
31.
System function
32.
Function with arguments
33.
Array containing one or more array
34.
Key valued pair
35.
Numeric Index
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications களப்பெயர் முறைமை (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு எடுத்துக்காட்டுகள் மற்றும் நெறிமுறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications கணினி வலையமைப்பு ஓர் அறிமுகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-உடன் MySQL-ஐ இணைத்தல் Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards