in Technology by
Explain the syntax for for loop?

1 Answer

0 votes
by
for(expression-1;expression-2;expression-3) {
   //set of statements
}

When control reaches for expression-1 is executed first. Then following expression-2, and if expression-2 evaluates to non-zero ‘set of statements’ and expression-3 is executed, follows expression-2.

Related questions

0 votes
    What is the syntax of while loop in shell scripting?...
asked May 28, 2021 in Technology by JackTerrance
0 votes
    Explain about the SAP ABAP - Loop Control?...
asked Oct 18, 2020 in Technology by JackTerrance
0 votes
    How you can implement nullable types in C#? explain with the syntax of Nullable type....
asked Jul 27, 2021 in Technology by JackTerrance
0 votes
    Which of the following for loop declaration is not valid? a) for ( int i = 99; i >= 0; ... ;Reference: stackoverflow.com 🔗Source: Java Interview Questions and Answers...
asked Dec 19, 2020 in Technology by Editorial Staff
0 votes
    Which control loop is recommended if you have to execute set of statements for fixed number of times?...
asked Nov 9, 2020 in Technology by JackTerrance
+1 vote
    What is the correct code to have the following output in C using nested for loop?...
asked Nov 8, 2020 in Technology by JackTerrance
0 votes
    What are the general description for loop statements and available loop types in C?...
asked Nov 8, 2020 in Technology by JackTerrance
+1 vote
    ____ allows you to loop through a block of code as long as the specified condition is true. a)Tag b)While c)For...
asked Oct 8, 2020 in Technology by JackTerrance
0 votes
    How can I apply my div position x value to a variable? And how to iterate it in a for loop? ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    So I have a for loop that I want to output a new line in a textview every single time it goes ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 10, 2022 in Education by JackTerrance
0 votes
    I've got an output from an API call as a list: out = client.phrase_this(phrase='ciao', database= ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    I've got an output from an API call as a list: out = client.phrase_this(phrase='ciao', database= ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    why it's not working.. i want to update my table in database this is my code. for ($i=0; ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    I have this array of objects. let links = [ { url: 'some url 1', status: 200 }, { url: ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
...