Like Tree1Likes
  • 1 Post By anduril462

Help with infinite loops

This is a discussion on Help with infinite loops within the C Programming forums, part of the General Programming Boards category; Code: #include Code: <stdio.h> int main(){ for (;;) { printf( "%d " ,10); } return 0; } The output is ...

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    7

    Post Help with infinite loops

    Code:
    #include
    Code:
    <stdio.h>
    int main(){
    for(;;) {
             printf("%d ",10);
        }
    return 0;
    }
    


    The output is an infinite loop. What causes it to be an infinite loop?

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,555
    Stop asking us to do your homework assignments for you. How about you read about for loops in your textbook, and work out an answer on your own. If you're really stuck, tell us why YOU think it's an infinite loop, and we will tell you if it's right or wrong.
    Salem likes this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 06-01-2011, 04:19 PM
  2. Infinite Loops in C
    By DaniiChris in forum C Programming
    Replies: 8
    Last Post: 07-06-2008, 12:21 PM
  3. Infinite While Loops Question
    By hern in forum C++ Programming
    Replies: 4
    Last Post: 08-13-2005, 07:27 PM
  4. please help, infinite loops!
    By HybridM in forum C++ Programming
    Replies: 18
    Last Post: 01-14-2003, 08:27 PM
  5. i have infinite loops. why?
    By hermit in forum C Programming
    Replies: 20
    Last Post: 04-17-2002, 06:58 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21