Fixed loop: this is the loop where the number of iterations are known.
Variable loop: Here the number of iterations are not known
Example for a variable loop.
The pseudocode for variable whille loop
begin
character cchoice
display"enter the choice"
accept cchoice
while(cchoice='y')
begin
//execute the statements
end
end
Rkarthikeyan
Chat with our AI personalities
A conditional loop will check a conditional statement at the beginning/end of each loop:
char answer;
while(answer == 'y')
{
printf("Loop again? ");
scanf(answer);
}
I'm not sure what a fixed loop is, maybe you are referring to an infinite loop?
while(true)
{
printf("Looping forever!\n");
}
a fixed loop is obviously a loop that is fixed ;D
A loop usually referred to the program flow control with possible repetition of executing the same codes, an array is an abstraction of fixed size container. 2 different concepts.
That a loop is curved and a whorl is shaped like a wave.
Yes. A variable declared inside the loop is a local variable for the code block enclosed by the {} statements of the for loop. The variable will not be available to be used by any code outside the code block.
decremented