# Php Programming Code Examples

## Php > Algorithms Code Examples

### Recursive function to move files on a filesystem

Count Zeros and Ones in a Binary Number -
Program input a number from user and count total number of ones (1s) and zeros (0s) in the given number using bitwise operator. How to count zeros and ones in binary number using

Finds out the Roots of Quadratic Equation -
C Program calculates the roots of a quadratic equation. First it finds Discriminant using the Formula: Disc = 'y*y-4*x*z'. There are 3 types of roots. They are complex, distinct and equal

C Code strlen Return the Length of Strings -
C programming string function strlen returns the "length of the string". Program code print the Length of the string. It returns the length of the string without including 'end character'

Program to Accept Paragraph Using Scanf -
C Language program accept paragraph using scanf. 'Scanf' accept Characters entered with spaces and it also accepts the words, newline characters. 'Represent' that all characters are

C++ Program Code Implement Radix Sort -
In this algorithm Sorting of Data is done from least significant digit to most significant digit. Here we need 10 different spaces labeled 0 to 9. Assume we have "n" Number of inputs. Let

Calculate the Sum of the Elements of each -
Program code take the MxN matrix as input. Define two functions separately for row sum and column sum. Use for loops to calculate the sum of the elements of each row and...

Using Binary Search Technique & Displays -
To perform "Binary Search" in 'C++', enter the array size, enter the array elements. Now ask to enter an element that is going to be search to "start searching" that element using binary

Checks if an Directed Graph is Tree or Not -
A C++ Program to check whether an directed graph is tree or not. Graph is tree if it doesn't contain cycles. Pointer to an array containing adjacency lists. Returns true if there is a cycle