TN Online TestSamacheer Kalvi practice

12th Standard Computer Applications — Functions and Arrays in PHP: Book Back MCQs with Answers & Explanations

Share this chapter: Telegram

Every Book Back multiple-choice question from Functions and Arrays in PHP (12th Standard Computer Applications, Samacheer Kalvi) — each with the correct option highlighted and a clear, worked explanation. Free to read in English and Tamil.

Answer key at a glance

Q1
A_________is a block of code that performs a specific task.
  • A. parameter
  • B. functionCorrect
  • C. class
  • D. label
Explanation. A function is a reusable block of code designed to perform a specific, modular task within a program.
Q2
Pre-defined functions are also called _________.
  • A. user-defined functions
  • B. recursive functions
  • C. built-in functionsCorrect
  • D. lambda functions
Explanation. Pre-defined functions built directly into the PHP language are referred to as built-in functions.
Q3
Which one of the following is the right way of defining a function in PHP?
  • A. function functionname() { // code to be executed }Correct
  • B. function() {}
  • C. def myFunction():
  • D. None of the above
Explanation. In PHP, a function is defined using the keyword 'function' followed by the function name, parentheses, and code block enclosed in curly braces.
Q4
A user-defined function in PHP starts with the keyword _________.
  • A. functionCorrect
  • B. def
  • C. defined
  • D. funct
Explanation. The 'function' keyword is used to declare a user-defined function in PHP.
Q5
Which of the following is a correct way to call a function in PHP?
  • A. functionName();Correct
  • B. call functionName;
  • C. execute functionName;
  • D. run functionName();
Explanation. A function is invoked or called by specifying its name followed by parentheses containing any arguments, followed by a semicolon.
Q6
What is an array in PHP?
  • A. An array is a special data type.
  • B. It can hold many values under a single variable name.
  • C. An array element can be any type of data.
  • D. All of the aboveCorrect
Explanation. In PHP, an array is a special data type that can store multiple values of any data type under a single variable name.
Q7
How many types of arrays are there in PHP?
  • A. 2
  • B. 3Correct
  • C. 4
  • D. 5
Explanation. PHP supports three primary types of arrays: indexed arrays, associative arrays, and multidimensional arrays.
Q8
What is the index of the first element in an indexed array in PHP?
  • A. 0Correct
  • B. 1
  • C. 2
  • D. 3
Explanation. Indexed arrays in PHP use numeric indexes that begin at zero for the first element by default.
Q9
What is the index of the third element in an indexed array in PHP with 5 elements?
  • A. 2Correct
  • B. 3
  • C. 4
  • D. 5
Explanation. Since array indexing starts at zero, the first element has index 0, the second has index 1, and the third element has index 2.
Q10
How do you create an indexed array in PHP?
  • A. By enclosing a comma-separated list of values in square brackets
  • B. By using the array() function
  • C. By enclosing a comma-separated list of values in curly braces
  • D. Both A and BCorrect
Explanation. PHP allows creating indexed arrays either using square brackets syntax or by using the built-in array() function.
Q11
How do you access the elements of an indexed array in PHP?
  • A. By using the array index in square bracketsCorrect
  • B. By using the array key in square brackets
  • C. By using the array index in curly braces
  • D. By using the array key in curly braces
Explanation. To access elements of an indexed array, specify the numeric index inside square brackets following the array variable name.
Take the Book Back practice test → Open the app

More for this chapter

Additional MCQs15 extra MCQs · solved Practice TestInteractive · instant score Book Back TestTest yourself on the textbook set Additional MCQ TestTest yourself on the extra set Study NotesConcepts & methods Formula SheetAll key formulas

About these Functions and Arrays in PHP questions

These are the Book Back multiple-choice questions for Functions and Arrays in PHP from the Tamil Nadu State Board (Samacheer Kalvi) 12th Standard Computer Applications syllabus. Each question shows the correct option and an original, step-by-step explanation so you understand the method, not just the answer. Use the answer key above to jump to any question, then take the practice test to check yourself under exam-like conditions.

Frequently asked questions

How many MCQs are there in Functions and Arrays in PHP?

This chapter has 11 book-back multiple-choice questions, each with the correct answer and a step-by-step explanation.

Are these 12th Standard Computer Applications MCQs free to practise online?

Yes. Every question, answer and explanation here is free, and you can also take them as a timed practice test.

Where can I find the Functions and Arrays in PHP book-back answers?

The correct option for each question is highlighted on this page with a worked explanation, plus a quick answer-key summary at the top.

More chapters in Computer Applications

View all
1 Multimedia 2 An Introduction to Adobe PageMaker 3 Introduction to Database Management System 4 PHP: Hypertext Preprocessor 6 Conditional Statements in PHP 7 Loops in PHP 8 Forms and Files 9 Connecting PHP and MYSQL 10 Introduction to Computer Networks 11 Network Examples and Protocols 12 Domain Name System (DNS) 13 Network Cabling 14 Open Source Concepts 15 E-Commerce 16 Electronic Payment Systems 17 E-Commerce Security Systems 18 Electronic Data Interchange- EDI