Like Tree6Likes

a program recursive print from 1 to 2^n

This is a discussion on a program recursive print from 1 to 2^n within the C Programming forums, part of the General Programming Boards category; What compiler are you using... If it's not going past 16 bits I'm guessing you're using some old DOS version ...

  1. #16
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    What compiler are you using...

    If it's not going past 16 bits I'm guessing you're using some old DOS version of Turbo C... which has been obsolete for more than a decade.

    Grab a newer compiler... Pelles C is a good choice. When you download it spend some time in the help file and learn what's going on before you do any coding... In particular look up the tutorial on making your first project.
    abbaskhan likes this.

  2. #17
    Registered User
    Join Date
    Jun 2005
    Posts
    5,833
    ... or use a long type.
    abbaskhan likes this.
    Right 98% of the time, and don't care about the other 3%.

  3. #18
    Registered User
    Join Date
    May 2009
    Posts
    2,372
    FYI: It is normally not allowed to use a loop in a recursive function by the teachers doing the grading.

    Tim S.
    abbaskhan likes this.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

  4. #19
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    @OP: Also learn about bitwise shifts (<< and >>), because they'll help you in this situation.
    abbaskhan likes this.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with a recursive expression tree program
    By TeamRival in forum C Programming
    Replies: 6
    Last Post: 03-25-2011, 07:27 PM
  2. Tracing through a recursive program in C
    By Hybodus in forum C Programming
    Replies: 3
    Last Post: 12-18-2010, 04:48 PM
  3. Recursive print every time...
    By BobDole11 in forum C Programming
    Replies: 5
    Last Post: 10-27-2008, 12:42 AM
  4. Recursive binary search program help.
    By mooney in forum C Programming
    Replies: 3
    Last Post: 04-04-2008, 01:12 AM
  5. Help!!this program is Recursive Function or not?
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 06-25-2002, 03:40 AM

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