Advertisements
Advertisements
प्रश्न
Differentiate While and Do while loops.
अंतर स्पष्ट करें
Advertisements
उत्तर
| While loop | Do while loop |
| The while statement will execute a block of code if and as long as a test expression is true. | Do while loop always run the statement inside of the loop block at the first time execution. |
| If the test expression is true then the code block will be executed. After the code has executed the test expression will again be evaluated and the loop will continue until the test expression is found to be false. | Then it is checking the condition whether true or false. It executes the loop if the specified condition is true. |
|
|
shaalaa.com
Looping Structure
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
APPEARS IN
संबंधित प्रश्न
The loop exclusively used for arrays is _____.
Loops that iterate for fixed number of times is called ______.
for ($ x=0; $ x<5; x++)
echo “Hai”
The above loop executes how many no of times?
Define for loop in PHP.
What is For each loop in PHP?
Write Syntax of For loop in PHP.
Explain the use of for each loop in PHP.
Differentiate For each and While loop.
Explain the process Do while loop.
Explain working of loops in array.
