![]() |
Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 7 Looping Structure Notes |
Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Notes PDF Download: Students of class can download the Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Notes PDF Download from our website. We have uploaded the Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure notes according to the latest chapters present in the syllabus. Download Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Chapter Wise Notes PDF from the links provided in this article.
Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Notes PDF Download
We bring to you specially curated Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Notes PDF which have been prepared by our subject experts after carefully following the trend of the exam in the last few years. The notes will not only serve for revision purposes, but also will have several cuts and easy methods to go about a difficult problem.
Board |
Tamilnadu Board |
Study Material |
Notes |
Class |
Samacheer Kalvi 12th Computer Applications |
Subject |
12th Computer Applications |
Chapter |
Chapter 7 Looping Structure |
Format |
|
Provider |
How to Download Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Notes PDFs?
- Visit our website - https://www.samacheerkalvibook.com/
- Click on the Samacheer Kalvi 12th Computer Applications Notes PDF.
- Look for your preferred subject.
- Now download the Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure notes PDF.
Download Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Chapterwise Notes PDF
Students can download the Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Notes PDF from the links provided in this article.
PART – I
I. Choose The Correct Answer
Question 1.
Most complicated looping structure is ……………………………
(a) While
(b) Do While
(c) For
(d) None of them
Answer:
(c) For
Question 2.
Loops that iterate for fixed number of times is called ………………………….
(a) Unbounded loops
(b) Bounded loops
(c) While loops
(d) For loops
Answer:
(b) Bounded loops
Question 3.
Which loop evaluates condition expression as Boolean, if it is true, it executes statements and when it is false it will terminate?
(a) For loop
(b) For each loop
(c) While loop
(d) All of them
Answer:
(d) All of them
Question 4.
Which loop evaluates condition expression as Boolean, if it is true, it executes statements and when it is false it will terminate?
(a) For loop
(b) For each loop
(c) While loop
(d) All of them
Answer:
(d) All of them
Question 5.
What will be displayed in a browser when the following PHP code is executed:
<?php
for (Scounter = 20; $counter< 10;
$counter++)
{
echo “Welcome to Tamilnadu “;
}
echo “Counter is: Scounter”;
?>
(a) Welcome to Tamilnadu
(b) Counter is: 20
(c) Welcome to Tamilnadu Counter is: 22
(d) Welcome to Tamilnadu Welcome to Tamilnadu Counter is: 22
Answer:
(b) Counter is: 20
Question 6.
What will be displayed in a browser when the following PHP code is executed:
<?php
for (Scounter = 10; Scounter = 10;
$counter = $counter + 5){
echo “Hello”;
}
?>
(a) Hello Hello Hello Hello Hello
(b) Hello Hello Hello
(c) Hello
(d) None of the above
Answer:
(d) None of the above
Question 7.
PHP supports four types of looping techniques?
(a) for loop
(b) while loop
(c) for each loop
(d) all the above
Answer:
(d) all the above
Question 8.
Consider the following code
<? php
$count=12;
do{
printf(“%d squared=%d<br/>”,
Scount, pow($count,2));
} while($count<4);
?>
What will be the output of the code.
(a) 12 squared 141
(b) 12 squared=141
(c) “12 squared=141”
(d) Execution error
Answer:
(d) Execution error
Question 9.
What will be the output of the following PHP code?
<?php
for ($x = 1; $x < 10;++$x)
{
print “*\t”;}
?>
(a) **********
(b) *********
(c) ***********
(d) Infinite loop
Answer:
(b) *********
Question 10.
What will be the output of the following PHP code?
<?php
for ($x =-1; $x < 10;–$x)
{
print $x;
}
?>
(a) 123456713910412
(b) 123456713910
(c) 1234567139104
(d) Infinite loop
Answer:
(d) Infinite loop
PART – II
II. Short Answer
Question 1.
Define Looping Structure in PHP?
Looping Structure:
Answer:
- Looping Structures are useful for writing iteration logics.
- It is the most important feature of many programming languages, including PHP.
Question 2.
Define for loop in PHP?
Answer:
For Loop:
For loop is an important functional looping system which is used for iteration logics when the programmer know in advance how many times the loop should run.
Syntax:
for (init counter; test counter; increment counter)
{
code to be executed;
}
Question 3.
What is For each loop in PHP?
Answer:
For each Loop:
- for each loop is exclusively available in PHP.
- It works only with arrays. The loop iteration deepens on each KEY Value pair in the Array.
- For each, loop iteration the value of the current array element is assigned to $value variable and the array pointer is shifted by one, until it reaches the end of the array element.
Question 4.
List out Looping Structure in PHP?
Answer:
- for Loop
- While Loop
- For each Loop
- Do While Loop
Question 5.
Write Syntax of For loop in PHP?
Answer:
for (init counter; test counter; increment counter)
{
code to be executed;
}
Question 6.
Write Syntax of For each loop in PHP?
Answer:
for each ($array as $value)
{
code to be executed;
}
Question 7.
Write Syntax of while loop in PHP?
Answer:
while (condition is true)
{
code to be executed;
}
Question 8.
Write Syntax of Do while loop in PHP?
Answer:
do
{
code to be executed;
}
while (condition is true);
Question 9.
Compare For loop and for each loop?
Answer:
For loop:
The for loop is used when you know in advance how many times the script should run.
for each loop:
The for each loop works only on arrays, and is used to loop through each key/value pair in an array.
Question 10.
Usage of foreach loop in PHP?
Answer:
The foreach loop works only on arrays and is used to loop through each key/value pair in an array.
PART – III
III. Explain in Brief Answer
Question 1.
Write the features Looping Structure?
Looping Structure:
Answer:
- Looping Structures are useful for writing iteration logics.
- It is the most important feature of many programming languages, including PHP.
- They are implemented using the following categories:
- For Loop
- For each Loop
- while Loop
- Do while Loop
1. For Loop:
For loop is an important functional looping system which is used for iteration logics when the programmer know in advance how many times the loop should run.
Syntax:
for (init counter; test counter; increment counter) {
code to be executed;
}
2. For each Loop:
foreach loop is exclusively available in PHP. It works only with arrays. The loop iteration deepens on each KEY Value pair in the Array. For each, loop iteration the value of the current array element is assigned to $value variable and the array pointer is shifted by one, until it reaches the end of the array element.
Syntax:
for each ($array as $value)
{
code to be executed;
}
3. While Loop:
While loop is an important feature which is used for simple iteration logics. It is checking the condition whether true or false. It executes the loop if specified condition is true.
Syntax:
while (condition is true)
{
code to be executed;
}
4. Do While Loop:
Do whileloop always run the statement inside of the loop block at the first time execution. Then it is checking the condition whether true or false. It executes the loop, if the specified condition is true.
Syntax: do
{
code to be executed;
}
while (condition is true);
Question 2.
Discuss in detail about Foreach loop?
Answer:
For each Loop:
foreach loop is exclusively available in PHP. It works only with arrays. The loop iteration deepens on each KEY Value pair in the Array. For each, loop iteration the value of the current array element is assigned to $value variable and the array pointer is shifted by one, until it reaches the end of the array element.
Syntax:
for each ($array as Svalue)
{
code to be executed;
}
The foreach construct provides an easy way to iterate over arrays, foreach works only on arrays and objects, and will issue an error when you try to use it on a variable with a different data type or an uninitialized variable.
Example:
<?php
$Student_name = array(“Magilan”, “Iniyan”,
“Nilani”, “Sibi”, “Shini”);
foreach (SStudent_name as $value)
{
echo “Svalue <br>”;
}
?>
Question 3.
Explain the process Do while loop?
Do While Loop:
Answer:
Do while loop always run the statement inside of the loop block at the first time execution. Then it is checking the condition whether true or false. It executes the loop, if the specified condition is true.
Syntax:
do
{
code to be executed;
}
while (condition is true);
Example:
<?php
$Student_count = 10;
$student_number=1;
do
{
echo “The student number is: $student_number<br>”;
$ student_number++;
}
while($student_number<= $Student_count)
?>
Question 4.
Explain concepts of for loop with example?
Answer:
For Loop:
For loop is an important functional looping system which is used for iteration logics when the programmer know in advance how many times the loop should run.
Syntax:
for Unit counter; test counter; increment counter)
{
code to be executed;
}
Parameters:
- init counter: Initialize the loop initial counter value
- Test counter: Evaluated for every iteration of the loop. If it evaluates to TRUE, the loop continues. If it evaluates to FALSE, the loop ends.
- Increment counter: Increases the loop counter value.
Example:
<?php
for ($i = 0; $i<= 10; $i++)
{
echo “The number is: $i<br>”;
}
?>
Question 5.
Explain array concepts in Looping Structure?
Answer:
Foreach Loop:
for each loop is exclusively available in PHP. It works only with arrays. The loop iteration deepens on each KEY Value pair in the Array. For each, loop iteration the value of the current array element is assigned to $value variable and the array pointer is shifted by one, until it reaches the end of the array element.
Syntax:
for each ($array as Svalue)
{
code to be executed;
}
The for each construct provides an easy way to iterate over arrays, foreach works only on arrays Foreach loop Structure and Flow and objects, and will issue an error when you try to use it on a variable with a different data type or an uninitialized variable.
Example:
<?php
$Student_name = array(“Magilan”, “Iniyan”,
“Nilani”, “Sibi”, “Shini”);
foreach (SStudentname as Svalue) {
echo “Svalue <br>”;
}
?>
Samacheer Kalvi 12th Computer Applications Solutions Looping Structure Additional Question and Answer
1. Choose The Best Answer
Question 1.
………………………….. structures are useful for writing iteration logics.
Answer:
Looping
Question 2.
Which of the following is an exit check loop?
a) for each
b) for
c) while
d) do. .while
Answer:
d) do. .while
Question 3.
Find the true statement from the following.
(a) Init counter initialises the loop
(b) Increment counter initialises the loop
Answer:
(a) Init counter initialises the loop
Question 4.
……………… loops execute a block of code a specified number of times.
a) foreach
b) for
c) while
d) do..while
Answer:
b) for
Question 5.
How many segments are there in a for loop?
(a) 1
(b) 2
(c) 3
(d) 4
Answer:
(c) 3
Question 6.
Pick the odd one out related to the parameters of the for loop?
(a) init
(b) test
(c) text
(d) Increment
Answer:
(c) text
Question 7.
How many types of loops are there?
(a) 1
(b) 2
(c) 3
(d) 4
Answer:
(d) 4
Question 8.
Each segment of the for loop is terminated by
(a) ,
(b) ;
(c) :
(d) .
Answer:
(b) ;
Question 9.
Which loop is exclusively available in PHP?
(a) For
(b) While
(c) for each
(d) do-while
Answer:
(c) for each
Question 10.
Which of the following loop works only with arrays?
(a) for
(b) while
(c) for each
(d) do-while
Answer:
(c) for each
Question 11.
Find the Incorrect statement
(I) For loop works only with arrays
(II) For each loop works only with arrays
Answer:
(I) For loop works only with arrays
Question 12.
Which one of the following loops has key-value pair?
(a) for
(b) for each
(c) while
(d) do.while
Answer:
(b) for each
Question 13.
Assertion (A): In each loop, the array pointer is shifted by one.
Reason (R): Whether it reaches the end of the array element
(a) A is True, R is correct But R is not the correct explanation for A
(b) Assertion is True, Reason is False
(c) Assertion is false, Reason is true
(d) Assertion and Reason are correct and R is the correct reason for A.
Answer:
(d) Assertion and Reason are correct and R is the correct reason for A.
Question 14.
Find the Wrong statement
(a) For each work on arrays and pointers
(b) For each work on arrays
(c) For each work on arrays and objects
(d) For each work on objects
Answer:
(a) For each work on arrays and pointers
Question 15.
Find the correct statement from the following.
(a) For each can be used for variables with a different data type
(b) For each can be used with an uninitialized variable
(c) For each can be used for objects
Answer:
(c) For each can be used for objects
Question 16.
Which loop is used for simple iteration objects?
(a) For
(b) For each
(c) While
(d) do..while
Answer:
(c) While
Question 17.
Which one of the following loops will be executed atleast once?
(a) For
(b) For each
(c) While
(d) do..while
Answer:
(d) do..while
II. Short Answers
Question 1.
Write a short note on all the loops
Answer:
- PHP while loops execute a block of code while the specified condition is true.
- The for loop is used when you know in advance how many times the script should run.
- The for-each loop works only on arrays and is used to loop through each key/value pair in an array.
- do…while – loops through a block of code once, and then repeats the loop as long as the specified condition is true.
Question 2.
Give the flow chart for For Loop?
Answer:
Question 3.
Write a php program to print the students name in the array?
Example:
Answer:
<?php
$Student_name = array(“Magilan”, “Iniyan”,
“Nilani”, “Sibi”, “Shini”);
foreach ($Studentname as $value) { echo “Svalue <br>”;
?>
Question 4.
Give the structure and flow for while loop?
Answer:
Question 5.
Give the structure and flow chart for do while loop?
Answer:
Question 6.
Write a php program to print star (*) in a single line?
Answer:
<?php
for ($x = 1; $x < 10;++$x)
{
print “*\t”;}
?>
III. Explain in detail
Question 1.
Explain While loop?
Answer:
While Loop:
While loop is an important feature which is used for simple iteration logics. It is checking the condition whether true or false. It executes the loop if the specified condition is true.
Syntax:
while (condition is true) {
code to be executed;
}
Example:
<?php
$Student_count = 10;
$student_number=1;
while($student_number<= $Student_count)
{
echo “The student number is: $student_number<br>”;
$student_number++;
}
?>
How to Prepare using Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Notes PDF?
Students must prepare for the upcoming exams from Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Notes PDF by following certain essential steps which are provided below.
- Use Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure notes by paying attention to facts and ideas.
- Pay attention to the important topics
- Refer TN Board books as well as the books recommended.
- Correctly follow the notes to reduce the number of questions being answered in the exam incorrectly
- Highlight and explain the concepts in details.
Samacheer Kalvi 12th Computer Applications All Chapter Notes PDF Download
- Samacheer Kalvi 12th Computer Applications Chapter 1 Multimedia and Desktop Publishing Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 1 Multimedia and Desktop Publishing Notes
- Samacheer Kalvi 12th Computer Applications Chapter 2 An Introduction to Adobe Pagemaker Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 2 An Introduction to Adobe Pagemaker Notes
- Samacheer Kalvi 12th Computer Applications Chapter 3 Introduction to Database Management System Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 3 Introduction to Database Management System Notes
- Samacheer Kalvi 12th Computer Applications Chapter 4 Introduction to Hypertext Pre-Processor Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 4 Introduction to Hypertext Pre-Processor Notes
- Samacheer Kalvi 12th Computer Applications Chapter 5 PHP Function and Array Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 5 PHP Function and Array Notes
- Samacheer Kalvi 12th Computer Applications Chapter 6 PHP Conditional Statements Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 6 PHP Conditional Statements Notes
- Samacheer Kalvi 12th Computer Applications Chapter 7 Looping Structure Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 7 Looping Structure Notes
- Samacheer Kalvi 12th Computer Applications Chapter 8 Forms and Files Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 8 Forms and Files Notes
- Samacheer Kalvi 12th Computer Applications Chapter 9 Connecting PHP and MYSQL Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 9 Connecting PHP and MYSQL Notes
- Samacheer Kalvi 12th Computer Applications Chapter 10 Introduction to Computer Networks Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 10 Introduction to Computer Networks Notes
- Samacheer Kalvi 12th Computer Applications Chapter 11 Network Examples and Protocols Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 11 Network Examples and Protocols Notes
- Samacheer Kalvi 12th Computer Applications Chapter 12 DNS (Domain Name System) Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 12 DNS (Domain Name System) Notes
- Samacheer Kalvi 12th Computer Applications Chapter 13 Network Cabling Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 13 Network Cabling Notes
- Samacheer Kalvi 12th Computer Applications Chapter 14 Open Source Concepts Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 14 Open Source Concepts Notes
- Samacheer Kalvi 12th Computer Applications Chapter 15 E-Commerce Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 15 E-Commerce Notes
- Samacheer Kalvi 12th Computer Applications Chapter 16 Electronic Payment Systems Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 16 Electronic Payment Systems Notes
- Samacheer Kalvi 12th Computer Applications Chapter 17 E-Commerce Security Systems Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 17 E-Commerce Security Systems Notes
- Samacheer Kalvi 12th Computer Applications Chapter 18 Electronic Data Interchange – EDI Notes PDF Download: Tamil Nadu STD 12th Computer Applications Chapter 18 Electronic Data Interchange – EDI Notes
0 comments:
Post a Comment