Tricky C

This is a discussion on Tricky C within the C Programming forums, part of the General Programming Boards category; func(int* a, int b) { while((*a&(1 << b))==0); } Why is this piece of code used??...

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    7

    Tricky C

    func(int* a, int b)
    {
    while((*a&(1 << b))==0);
    }
    Why is this piece of code used??

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Somebody liked it?

    Seriously, try it with some different values, and experiment a bit. Get out your deerstalking cap and pipe, and cue up your curiosity a bit. Have fun with it.

  3. #3
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,832

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 03-01-2008, 02:05 PM
  2. tricky output problem, dont understand
    By panfilero in forum C Programming
    Replies: 6
    Last Post: 11-12-2005, 12:30 AM
  3. very simple but tricky... please help
    By surdy in forum C Programming
    Replies: 6
    Last Post: 10-05-2004, 01:03 PM
  4. Hard Drive: A tricky treat
    By RoD in forum Tech Board
    Replies: 16
    Last Post: 10-28-2002, 02:24 PM
  5. A tricky macro
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 05-22-2002, 08:04 PM

Tags for this Thread


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