Program to find bit of a number at given bit-place and also make it set if it is unset

https://ide.codingblocks.com/s/54979.

The setBit function is not working properly.

Hey, there is no need to write this function, if you want to set a bit in an integer then you can do it like this intNumber = intNumber | (1 << bitPosition);.