मराठी
तामिळनाडू बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान इयत्ता १२

Differentiate While and Do while loops. - Computer Applications

Advertisements
Advertisements

प्रश्न

Differentiate While and Do while loops.

फरक स्पष्ट करा

उत्तर

While loop Do while loop
The while state­ment 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 expres­sion 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.
while(condition)
{
code to be execut­ed;
}
do
{
code to be executed;
}
while (condition is true);
shaalaa.com
Looping Structure
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 7: Looping Structure - Evaluation - PART – III [पृष्ठ ११८]

APPEARS IN

सामाचीर कलवी Computer Applications [English] Class 12 TN Board
पाठ 7 Looping Structure
Evaluation - PART – III | Q 5. | पृष्ठ ११८
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×