Which types of loops are used in Pascal?

devquora
devquora

Posted On: Feb 22, 2018

 

When you write a program, there may be situation generates which requires a number of times to execute the same block of code. This time you use the loops that can be used in many ways. In general, the loop runs with a sequence order. The different types of loops used are shown below:

  • While-do: It first tests the condition then execute the statement. It repeats the statement or a group of statements when the condition holds true and halts when condition becomes false.
  • For-do loop: It abbreviates the code for the variable and repeats the multiple statements until the testing variable become false.
  • Repeat-until loop: This is the same as while statement but it checks the condition at the end of the loop body. This means that the statements will execute at least once.
  • Nested-loops: in this, you can use any loop inside any other loop.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Pascal Interview Questions

    What do you understand by Pascal?

    This is the first question every interview may ask, so make a good definition in your mind. Pascal is a programming language which supports data structure and the structured programming. It is basical...

    Pascal Interview Questions

    Why Pascal?

    Pascal is a computer programming language which encourages you to enhance your programming skills. It is a language that you may easily learn and practices the programming techniques. It let you use f...

    Pascal Interview Questions

    Why Pascal is named as Pascal?

    Designed in 1968-1969 by Niklaus Wrath, it was first published in the year 1970. It is named after the Blaise Pascal who was French Mathematician and philosopher. He is famous for his invention of cal...