answersLogoWhite

0


Best Answer

While

Do-While

1. In this statement, the Boolean expression is checked before executing the loop body.

1. In this statement, the Boolean expression is checked after executing the loop body for the first time.

2. It doesn't execute its statement if the condition fails.

2. It will execute its statements at least once even if the condition fails. After that if the condition founds false the execution stops.

It is mainly used in menu like programs where all the available choices are printed at least once.

3. General loop form is

while (condition)

{

statements

}

3. General loop form is

do

{

statements

} while (condition)

4. Executing a code at least once tend to be relatively rare, thus the simple while is more commonly used

4. This used for a block of code that must be executed at least once

5. While loop is entry control loop

5. Do while is exit control loop

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between do while and while in C language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Difference between C and C programming language?

The C and C programming languages are one and the same. There is no difference between those languages.


What is the difference between c and c plus plus and c minus minus?

The main difference between the two is that C++ is an object oriented programming language while C is a structured programming language. Although C++ is derived from C, they are in fact completely separate languages that share a common syntax. However, C++ is backwardly compatible with C so while you may include C-style code within C++ programs, you cannot include C++ code in C programs.


What is the difference between the Linux shell and C?

C is a programming language. A shell is an interface.


What is difference between Turbo and Borland C?

turbo is word to do the programming language in c & c++ and i do no about borland


What is difference between c language and opearting system?

An operating system is a program that can be written in C


Is there any difference between turbo c and c plus plus?

turbo c is a compiler and c++ is a programming language.


What is the difference between C and Vbnet?

It is just a different coding language, but C is more for business that VBNET


What the difference between c and c plus plus?

The fundamental difference is that in C++ object-oriented programming (OOP) was added. C is a procedural language (that means. top-down structure design), where as C++, which is an extension of C itself, is an object oriented language.


What is the difference between visual basic and visual c?

The programming language: Visual Basic is a BASIC-like (or BASIC-derived) language, Visual C is... well C.


4 Difference between c program and vhdl program?

There are 4 main differences between C programming and VHDL programming. C is a mid-level language, while VHDL is a hardware description language. C can handle one type of instruction, while VHDL can handle two. C does not require as much resource usage as VHDL. C can be written only with logical thinking, but a VHDL programmer must understand hardware circuits.


What is diffence between c and c plus plus?

main difference b/w c and c++ is that c is procedural language whereas c++ is object oriented language also classes are not used in c but in c++ classes are used.


Difference between java and C plus plus?

java is an advanced object oriented programming language than c++