Thread: Explanation of function setbits

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    That doesn't look like K&R code to me. What version and page of the book is this from?
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

  2. #2
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Quote Originally Posted by oogabooga View Post
    That doesn't look like K&R code to me. What version and page of the book is this from?
    I agree with oogabooga.I looked at my K&R book(2nd edition) at the chapter sjmp said but found nothing similar.

  3. #3
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    Quote Originally Posted by std10093 View Post
    I agree with oogabooga.I looked at my K&R book(2nd edition) at the chapter sjmp said but found nothing similar.
    I just remembered that they often declared multiple variables on the same line (which is not done here) and left out unnecessary braces (again, not done here).

    It also seems kind of pointless to be printing this all out (all 212976 lines of output). I.e., what's the point of it all? Surely if it's from a book, any book, the book would say.

    It's more likely it's a programming puzzle. What does it do?
    Last edited by oogabooga; 08-10-2012 at 01:06 PM.
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [C] Setbits function
    By Tool in forum C Programming
    Replies: 25
    Last Post: 07-31-2014, 02:05 PM
  2. help with setbits function
    By cprog12 in forum C Programming
    Replies: 5
    Last Post: 05-23-2011, 01:23 PM
  3. setbits
    By Tool in forum C Programming
    Replies: 11
    Last Post: 02-06-2011, 03:35 PM
  4. Bitwise setbits function (knr 2-6)
    By olbas in forum C Programming
    Replies: 17
    Last Post: 03-10-2010, 07:40 AM
  5. Explanation of a function.
    By eXeCuTeR in forum C Programming
    Replies: 31
    Last Post: 11-27-2007, 05:26 AM

Tags for this Thread