## Check whether given number is Power of 2 using bitwise operators in C

Problem : Check whether given number is power of 2 using bitwise operators in C Algorithm : Let us see the binary representation of numbers which are power of 2: As we can see in above example,any number which is power of 2 has only 1 bit set. Now let us subtract 1 from above … Read more

## C Program to print the length of the string without using built-in function

One of the easiest ways to fine the length of the string in C is by using built-in function strlen. Using below code, we can find the length of the string without using any built-in functions. Output:

## How to check whether system is Big or Little Endian using C?

Problem : Write a optimized code to check whether the system is Big or Little Endian using C Understanding: Endianness of the system describes how the multibyte data are stored(int, float..etc). Let us take example of Big Endian vs Little Endian representation of number 0x11223344 Using above idea, we can use below program to check … Read more

## Count the number of bits set in an Integer using C

Problem : Write a best approach to count the number of bits set in given integer number using C. Understanding : All the numbers can be represented in Binary Format. For example Number 5 can be represented as 0101. Our program should take number 5 as number and count the number of bits set and … Read more

## How to check if the machine running on is 32 or 64 bit in C?

One of the easiest ways to find whether modern processor is 32-Bit or 64-Bit is by understanding the size of generic pointer(void*). Below is the C code which prints the 32/64 Bit:

## How to setup Raspberry Pi Pico SDK in Ubuntu

Raspberry Pi Pico is one of the most affordable microcomputers available in the market. Today let us see how to setup the SDK and Toolchain in Ubuntu 20.04LTS and compile Example application. Cloning the the SDK and Example Repos First Create a folder where you want to store your SDK & Example source code Now … Read more