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 are different types of pointers?
what value is returned to operating system after program execution?
Explain how can I pad a string to a known length?
why programs in c are running with out #include
In a byte, what is the maximum decimal number that you can accommodate?
What is the meaning of c in c language?
Which header file is essential for using strcmp function?
Explain the difference between the local variable and global variable in c?
What does void main () mean?
Write a C program to count the number of email on text
What is the newline escape sequence?
Why do we use return in c?
Write a program to print fibonacci series using recursion?
main() { printf("hello"); fork(); }
How do you list a file’s date and time?