Thread: Unexpected output

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    How do you expect loops like this to ever exit?
    Code:
          while(info[j] != ' ')
          {
             j=0;
             j++;
          }
    Step through at least 3 iterations of your loop in your head or on paper. What is 'j' each time?
    If you understand what you're doing, you're not learning anything.

  2. #2
    Registered User
    Join Date
    Nov 2011
    Posts
    39

    Hey

    Hey i said i'm new to programming so just help me out don't dis me.

  3. #3
    Registered User
    Join Date
    Nov 2011
    Posts
    39
    i think i changed sumthin coz that part of the code worked prreviously

  4. #4
    Registered User
    Join Date
    Nov 2011
    Posts
    39
    Oh okay but wat about the rest of the code?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unexpected output
    By juice in forum C Programming
    Replies: 24
    Last Post: 11-18-2011, 11:18 PM
  2. Unexpected Output, modal window!
    By gaurav_13191 in forum Windows Programming
    Replies: 13
    Last Post: 06-29-2011, 03:47 PM
  3. Unexpected Output in structure
    By bhagwat_maimt in forum C++ Programming
    Replies: 1
    Last Post: 12-29-2006, 10:50 PM
  4. unexpected output
    By crash88 in forum C Programming
    Replies: 2
    Last Post: 05-16-2006, 09:03 PM