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
What is d'n in c?
write a program to copy the string using switch case?
What is the use of header?
Where are local variables stored in c?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
What is static and volatile in c?
What is the ANSI C Standard?
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
What is the hardest programming language?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What is binary tree in c?
Is there anything like an ifdef for typedefs?
Can a function argument have default value?
How can you find the day of the week given the date?
How many levels of pointers have?