NEW
Font size
WorksheetsCA Chapter 7 Loop
Total questions: 10
Worksheet time: 5mins
Which is used to work with array?
For loop
For each loop
while
do while
Loops that iterate for fixed number of times is called
unbounded loop
bounded loop
while loop
for loop
Which loop evaluates condition expression as Boolean, if it is true, it executes statements and when it is false it will terminate?
For loop
For each loop
While loop
All of these
for ($ x=0; $ x<5; x++)
echo “Hai”
The above loop executes how many no of times?
5
4
3
2
What will be displayed in a browser when the above PHP code is executed?
Welcome to Tamilnadu
Counter is: 20
Welcome to Tamilnadu Counter is: 22
Welcome to Tamilnadu Welcome to Tamilnadu Counter is: 22
What will be displayed in a browser when the following PHP code is executed?
Hello Hello Hello Hello Hello
Hello Hello Hello
None of the above
Hello
PHP supports which types of looping techniques;
for
while
do while
all of these
What will be the output of the code?
12 squared 141
“12 squared=144”
12 squared=144
Execution error
What will be the output of the following PHP code ?
**********
*********
***********
Error
What will be the output of the following PHP code ?
123456713910412
123456713910
1234567139104
Infinite loop
