The testing process: Implementing code or fixing bugs in C.
Motivation: Basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.
The testing process: Processing data all the way down to individual bits.
Motivation: Bit manipulation is an important skill for a programmer working on low-level data processing.
Implement the inspect_bits function that checks if given number contains 2 or more consecutive ones in its binary representation. If it does, the function should return 1. Otherwise, it should return 0.
For example, inspect_bits(13) should return 1 as it contains 2 consecutive ones in its binary representation (1101).
- Example case: Wrong answer
- Various numbers: Wrong answer