# C Programming Code Examples

## C > Mathematics Code Examples

### Check Whether a Number can be Expressed as Sum of Two Prime Numbers

C Code Locate Highest Lowest nr in Array -
C Program example Return the largest of the two passed numbers. Return smallest of the two passed numbers. Load some random values into the array. Print set of numbers.

Print some General File info in C program -
Filename, device, inode, protection, number of hard links, user ID of owner, group ID of owner, device type, total size, blocksize for filesystem I/O, number of blocks allocated,

C++ Program Reverse an Integer Number -
This takes an integer input from the user and stores it in 'variable n'. Then the while loop is iterated until n != 0 is false. In each iteration, the remainder when the value of n is divided

Convert String to Lowercase using strlwr() -
C code convert uppercase string to lowercase using 'For Loop'. Internally characters in C are represented as integer value known as 'ASCII' value. Which means if we write a or any other

Copy all elements of an array into another -
C Programming copy all elements of an array into Another array. Accepting values into Array. Copying data from array 'a' to array 'b. Printing of all elements of array. Print the...

Finds HCF/GCD Using For Loop Statement -
The largest integer which can perfectly divide 2 integers is known as GCD or HCF of those 2 numbers. The logic of this program is simple. In this, small integer between "number1" and

Program Sort Text data by rhyming order -
Create a new node. First, we handle the case where 'data' should be the first element. Apperently this !IS! the first element. Now data should [be|becomes] the first element.

Randomized Primality Testings Algorithm -
Method that implements the basic primality test. If witness doesn't return 1, n is definitely composite. Do this by computing a^i (mod n) and looking for "non-trivial" square roots of 1