TN Online TestSamacheer Kalvi practice

12th Standard Computer Applications — Conditional Statements in PHP: Additional MCQs with Answers & Explanations

Share this chapter: Telegram

15 extra multiple-choice questions for Conditional Statements in PHP (12th Standard Computer Applications, Samacheer Kalvi), beyond the ones printed in the textbook — each with the correct option highlighted and a clear, worked explanation. Free to read in English and Tamil.

Answer key at a glance

Q1
In PHP, which of the following character sets is used to separate and define blocks of statements within a control structure?
  • A. Parentheses ( )
  • B. Curly braces { }Correct
  • C. Square brackets [ ]
  • D. Angle brackets < >
Explanation. Curly braces are used in PHP to separate and group blocks of statements within control structures.
Q2
Which of the following is a syntactical requirement for the condition or expression in PHP control structures?
  • A. It must be enclosed in curly braces.
  • B. It must be enclosed in parentheses.Correct
  • C. It must be terminated with a colon.
  • D. It must be enclosed in square brackets.
Explanation. In PHP control structures, any condition or expression must be enclosed within parentheses.
Q3
How can the 'elseif' keyword in a PHP conditional statement alternatively be written?
  • A. else_if
  • B. else ifCorrect
  • C. else-if
  • D. elsif
Explanation. The keyword elseif in PHP can also be written as two separate words: else if.
Q4
What occurs in a PHP switch statement if a break statement is omitted at the end of a matching case block?
  • A. The program will throw a compiler error immediately.
  • B. The execution will stop and the switch statement will exit.
  • C. The execution will continue to run the code of subsequent cases until a break is encountered.Correct
  • D. The default case block will be executed immediately.
Explanation. Without a break statement, execution falls through and runs subsequent cases until a break is found.
Q5
Which of the following are the two major categories of control structures in PHP?
  • A. Input statements and Output statements
  • B. Conditional statements and Looping statementsCorrect
  • C. Database queries and File handling functions
  • D. Function declarations and Array definitions
Explanation. PHP control structures are divided into two main categories: conditional statements and looping statements.
Q6
What is the term used for statements in a script that cause the flow of control to jump from one part of the script to another?
  • A. System functions
  • B. Connection strings
  • C. Control statementsCorrect
  • D. SQL commands
Explanation. Statements that redirect the sequential execution flow to another part of the script are called control statements.
Q7
In a PHP 'if...else' statement, which block of code is executed if the specified condition evaluates to false?
  • A. The True-block
  • B. The default block
  • C. The False-blockCorrect
  • D. The switch block
Explanation. The else part containing the False-block is executed when the evaluated condition is false.
Q8
Which of the following statements is true regarding the 'default' case in a PHP 'switch' statement?
  • A. It must always be placed at the very beginning of the switch statement.
  • B. It is optional and will execute if none of the case values match the expression.Correct
  • C. It is mandatory and the script will fail to execute if it is omitted.
  • D. It is used to terminate each case block instead of the break statement.
Explanation. The default case is an optional block that executes when no other cases match the expression.
Q9
A PHP 'if...elseif...else' statement must begin and end with which parts respectively?
  • A. Begins with 'elseif' and ends with 'else'
  • B. Begins with 'if' and ends with 'elseif'
  • C. Begins with 'if' and ends with 'else'Correct
  • D. Begins with 'switch' and ends with 'default'
Explanation. This conditional structure always starts with the if keyword and concludes with the else block.
Q10
Which type of conditional statement in PHP is described as a multiple branching statement where control is transferred to one of many possible points based on a condition?
  • A. 'if' statement
  • B. 'if...else' statement
  • C. 'switch' statementCorrect
  • D. 'while' statement
Explanation. A switch statement transfers execution to one of several cases matching the tested expression.
Q11
If the condition evaluated in a simple 'if' statement in PHP is false, what is the behavior of the program?
  • A. The program exits with an execution error.
  • B. The code inside the curly braces is completely skipped.Correct
  • C. The program prompts the user to enter a new value.
  • D. The subsequent block is executed repeatedly.
Explanation. If the condition is false, the code inside the curly braces of an if statement is skipped.
Q12
In a PHP 'if...elseif...else' statement, how many blocks of code can be executed at most during a single run of the structure?
  • A. All blocks whose conditions are true
  • B. Exactly two blocks of code
  • C. Only one block of codeCorrect
  • D. None of the blocks of code
Explanation. Only the single block associated with the first true condition will be executed in this structure.
Q13
What is the parameter inside the parentheses of a PHP 'switch' statement that is checked against each case value?
  • A. The break keyword
  • B. The expression or variableCorrect
  • C. The default label
  • D. The curly brace
Explanation. The switch statement evaluates an expression or variable and compares its value to each case.
Q14
In an 'if...elseif...else' statement in PHP, how many 'elseif' parts can be included between the 'if' and 'else' parts?
  • A. Exactly one
  • B. At most three
  • C. One or moreCorrect
  • D. None
Explanation. The syntax allows one or more elseif parts to be placed between the if and else.
Q15
Which of the following is true about statement execution flow in a standard PHP script?
  • A. Statements are always executed in a strictly sequential order.
  • B. Statements must never execute based on conditions.
  • C. Flow of control can jump from one part of a script to another using control structures.Correct
  • D. Script statements always execute in reverse order.
Explanation. Using control structures, the flow of control can jump between different segments of a PHP script.
Take the Additional practice test → Open the app

More for this chapter

Book Back Questions10 textbook 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 Conditional Statements in PHP questions

These are the Additional multiple-choice questions for Conditional Statements 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 Conditional Statements in PHP?

This chapter has 15 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 Conditional Statements 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 5 Functions and Arrays 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