elliminate 0s

Discussion in 'C Programming' started by Jrdman2, Jan 1, 2010.

  1. Jrdman2

    Jrdman2 Guest

    how to elliminate zeros from a table allocated dynammically?
     
    Jrdman2, Jan 1, 2010
    #1
    1. Advertising

  2. On 1 Jan, 20:54, Jrdman2 <> wrote:

    > how to elliminate zeros from a table allocated dynammically?


    what's a table? How is the table initialised?
     
    Nick Keighley, Jan 1, 2010
    #2
    1. Advertising

  3. Jrdman2

    jacob navia Guest

    Jrdman2 a écrit :
    > how to elliminate zeros from a table allocated dynammically?


    Do your own homework. Turn on your brain and think how it could be done.
    When you have a solution, post it here, even if it isn't a good one.

    But do not expect this group to do your homework for you.
     
    jacob navia, Jan 1, 2010
    #3
  4. Jrdman2

    Kaz Kylheku Guest

    On 2010-01-01, Jrdman2 <> wrote:
    > how to elliminate zeros from a table allocated dynammically?


    Like this:

    new_table = realloc(table, 0);

    All the zeros are gone now. (So are the ones, is that okay?)
     
    Kaz Kylheku, Jan 1, 2010
    #4
  5. On 01/01/2010 12:54 PM, Jrdman2 wrote:
    > how to elliminate zeros from a table allocated dynammically?


    How would you do it from a table allocated statically?

    -Beej
     
    Beej Jorgensen, Jan 2, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jrdman

    elliminate 0s

    Jrdman, Jan 1, 2009, in forum: C Programming
    Replies:
    1
    Views:
    306
    CBFalconer
    Jan 2, 2009
Loading...

Share This Page