Thread: Timing program

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    835
    Code:
      while(*table1)
    It looks like you're assuming that malloc() initializes all the entries in the array table1 to nonzero values and puts a zero at the end. In fact, you can't assume anything about the values in the array before you initialize them. Same for table2.

    Edit: Probably you work with C strings a lot and forgot this wasn't one?
    Last edited by robatino; 08-13-2007 at 07:17 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. timing my program
    By chico1st in forum C Programming
    Replies: 3
    Last Post: 08-16-2007, 01:00 PM
  2. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  3. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM