what is the difference between entry control and exit
control statement?

Answer Posted / varsha

Entry checking loop works on while statement, Exit checking loop works on do....while statement.

Entry checking loop will check the condition at the very beginning and if the condition is false,it won't work......
The exit checking loop will check for the condition at the last and even if the condition is false,it will work at least once


Ex for entry controlled loop:
int i=6;
while(i<5)
{
System.out.println("hello");
}

Output:
no output...


Ex. for exit controlled loop:
int i=6;
do
{
System.out.println("hello");
}
while(i<5);

Output:
HELLO.....

Is This Answer Correct ?    8 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is d'n in c?

624


write a program to copy the string using switch case?

2391


What is the use of header?

612


Where are local variables stored in c?

562


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

605






What is static and volatile in c?

773


What is the ANSI C Standard?

768


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

622


What is the hardest programming language?

659


How can I rethow can I return a sequence of random numbers which dont repeat at all?

700


What is binary tree in c?

617


Is there anything like an ifdef for typedefs?

694


Can a function argument have default value?

656


How can you find the day of the week given the date?

607


How many levels of pointers have?

585