 C Programming Code Examples

C > Bitwise Operators Code Examples

C program to count leading zeros in a binary number

Code Find Prime Numbers in given Range - C Program code Find out the prime numbers between 1 to 100, 100 to 999... Input a range, for e.g. if you want the Prime Numbers from 100 to 999 then enter numbers 100 and 999...

Represent Graphs Using Incidence Matrix - This algorithm takes the input of the number of vertex. For each pair of vertex ask whether they're connected or not. Print the incidence matrix. Function to print the incidence matrix

Convert a Given Number of Days in Terms - C language program take the number of days as input. For the number of years, divide the input by 365 and obtain its quotient. For the number of weeks, divide the input by 365 and

If Else Check Given Integer is Odd or Even - The if...else statement executes some code if the test expression is true (nonzero) & some other code if the test expression is false (0). If test expression is true, codes inside the body

Generate a Graph for Given Fixed Degree - This algorithm generates a undirected graph for the given "Degree Sequence". It does not include self-edge and multiple edges. So this algorithm 'takes the input' of the number of

Code Finds Area & Circumference of Circle - C Program code to find area & circumference of circle. In this program we have to calculate the area and circumference of the circle. Two formulas for finding Circumference and Area

Program to find Maximum using var-args - Here, I will embed the logic to find maximum within a function. Lets define function to find maximum. 1 - give a meaningful name to our function. Say "max()" function is used to find

C++ Uses Naor Reingold Pseudo Function - A C++ Program to genrate random numbers using Naor-Reingold random function. Moni Naor and Omer Reingold described efficient constructions for cryptographic primitives in