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
Explain what header files do I need in order to define the standard library functions I use?
How many keywords (reserve words) are in c?
What is a keyword?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
Explain indirection?
What are the different types of pointers used in c language?
How do you define structure?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
program for reversing a selected line word by word when multiple lines are given without using strrev
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
What is data structure in c language?
Add Two Numbers Without Using the Addition Operator
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
write a program to print data of 5 five students with structures?
provide an example of the Group by clause, when would you use this clause