TN Online TestSamacheer Kalvi practice

12th Standard Computer Applications — Loops in PHP: Online Practice Test

Share this chapter: Telegram

Pick how many questions you want and set a time limit, then start. You'll get your score at the end with the correct answer and an explanation for every question. Free, in Tamil and English — 25 questions available.

Set up your test

Time remaining00:00
Q1
Which of the following is NOT a type of loop statement in PHP?
Q2
What type of loop is "for loop" in PHP?
Q3
What is the syntax for for loop in PHP?
Q4
What are the three parts of the for loop syntax in PHP?
Q5
When is the ‘initialization’ part of a for loop executed?
Q6
What is the purpose of the ‘increment’ part of a for loop?
Q7
What type of loop is “while loop” in PHP?
Q8
What type of loop is “do...while loop” in PHP?
Q9
Which looping structure should be used to iterate over elements of an array in PHP?
Q10
What is the output of the following code? \(array = array(1, 2, 3, 4, 5); foreach (\)array as \(value) { echo \)value; }
Q11
What is a control structure that repeatedly executes a block of code until a specific condition is met in PHP?
Q12
How many primary types of looping structures are supported in PHP as described in the textbook?
Q13
Which of the following loops is classified as an exit-check loop in PHP?
Q14
In a PHP for loop, which part of the loop syntax is executed exactly once at the very beginning?
Q15
If the condition of a while loop is false at the very first check, how many times will the code block be executed?
Q16
Which PHP loop structure guarantees that the code block will be executed at least once, even if the condition is false from the start?
Q17
What is the primary purpose of the foreach loop in PHP?
Q18
In the PHP loop statement foreach (\(employee as \)id => \(name), what does the variable \)id represent?
Q19
Which part of a PHP for loop is used to update the loop variable after each iteration?
Q20
In a PHP for loop, when is the loop condition evaluated?
Q21
What happens if a while loop's condition always evaluates to true and has no statement to modify the loop variable?
Q22
What is a group of statements designed to be executed together as a single unit in PHP control structures called?
Q23
To print both the keys and values of an associative array in PHP, which symbol separates the key and value variables in the foreach statement?
Q24
Besides the for loop, which other looping structure is classified as an entry-check loop in PHP?
Q25
What is the main difference in the minimum number of iterations between a while loop and a do...while loop in PHP?

More for this chapter

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

About this Loops in PHP test

This free online practice test covers Loops in PHP from the 12th Standard Computer Applications (Samacheer Kalvi) syllabus. Choose the number of questions and an optional time limit, then answer and submit — everything is checked in your browser, with the correct answers and a worked explanation shown at the end. For the full solutions to every question in this set, see the solved MCQs page.

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 6 Conditional Statements 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