About 14,300,000 results
Open links in new tab
  1. How do I declare several variables in a for (;;) loop in C?

    Here is how you write this loop with extra initialzers. Here is a working example that shows you how to bridge an extended loop onto a first. You use the first to pirate its variables and they …

  2. C - Loops - GeeksforGeeks

    May 13, 2025 · Loops in C programming are used to repeat a block of code until the specified condition is met. It allows programmers to execute a statement or group of statements multiple …

  3. C for Loop (With Examples) - Programiz

    In programming, a loop is used to repeat a block of code until the specified condition is met. C programming has three types of loops: We will learn about for loop in this tutorial. In the next …

  4. For Loops in C – Explained with Code Examples - freeCodeCamp.org

    Nov 3, 2021 · The for and the while loops are widely used in almost all programming languages. In this tutorial, you'll learn about for loops in C. In particular, you'll learn: the syntax to use for …

  5. Declaring Multiple Variables in a “for” Loop Initialization Clause

    Mar 13, 2024 · How to declare multiple variables in a for-loop initialization clause. Tagged with c, cpp.

  6. C For Loop - W3Schools

    When you know exactly how many times you want to loop through a block of code, use the for loop instead of a while loop: Expression 1 is executed (one time) before the execution of the …

  7. Can we define 2 counters of different types in a single for loop ...

    Mar 21, 2022 · Yes and no... You can define multiple ones, but they need to be of the same type, just as with ordinary variable declarations: for(int i = 0, j = 2; ;). For the condition and post …

  8. FOR loop in C programming language – Iteration Statements - CodinGeek

    Jan 8, 2017 · The syntax of a nested for loop is as follows(using two for loops): for(initialization; test; update) { for(initialization;test;update)//using another variable { //body of the inner loop } …

  9. Loops, #defines and Arrays - Swarthmore College

    C Handout 7 – Loops, #define and arrays (10/24/00) Loops. Often you will want to execute a section of code more than once. The mechanism for doing this is called a loop. We will discuss …

  10. C Loops Statements (for, while, do while) with Examples

    Nov 25, 2023 · The for loop is the most commonly used loop by the programmers and requires us to initialize three conditions in a single line at the start of the loop. Syntax. Below is the syntax …

Refresh