Who Is Gonna Tell Him

whoIsGonnaTellHim | programming-memes, program-memes, c++-memes, test-memes, function-memes, search-memes, c-memes, IT-memes, tests-memes | ProgrammerHumor.io
programming-memes, program-memes, c++-memes, test-memes, function-memes, search-memes, c-memes, IT-memes, tests-memes | ProgrammerHumor.io

Content

a Why does everyone keep telling me to use C? (self.programminghorror) submitted 2 hours ago by ZERICO2005 My task was to create a function in C that would take an integer, find the right-most 0, flip it to a 1, and flip all the 1's to the right of it to 0's. I don't understand why, but everyone tells me to just use c instead? Strange. uint32 t func(uint32 t c) S uint32t i 1; while (i ! 0) Searches for the right-most 0 if ((c i) 0) Tests if the bit is a zero break; ? i 1; if (i ! 0) s I else s c i; Flips the right-most o to a 1 c c; If no zeros were found, then it was probably hidden in the carry bit, flip all 1's to the i 1; Start at the 1 next to the right-most o while (i ! 0) Flip all 1's to the right of it to 0's c wi; i 1; ; return c; Whv are peoble so adamant that I use c instead of C?

More Like This