# C Programming Code Examples

## C > Arrays and Matrices Code Examples

### Find the Biggest Number in an Array of Numbers using Recursion

Program Copy String with strcpy Function -
Input a "string from user" and store it to some variable say text1, declare another variable to store "copy of first string" in text2. Run a loop from 0 to end of string. Loop structure should

Park-Miller Random Numbers Generation -
C++ Program to generate 'random' numbers using Park-Miller algorithm. general formula of a random number generator (RNG) of this type is: 'X_{k+1} = g X(k) mod n'. To generate

C Armstrong Numbers Between 2 Integers -
Program Print Armstrong Numbers between two Integers. In case of an armstrong number of 3 digits, the Sum of Cubes of each digits is equal to the number itself. For example: 407

C Code Selection Sort Method by Function -
C Program implements selection sort method using functions. 'Selection' Sort is among the simplest of Sorting Techniques. Lets first find the smallest in the array and exchange it with

Implement A Heuristic to Find the Vertex -
Problem takes E edges as input and outputs vertex cover of the graph, implementing the following heuristic. There is no "Polynomial" time algorithm "invented up to date" to find

C code simple Two Dimensional(2D) Array -
Program code demonstrates how to store the elements entered by user in a 2d array and how to display the elements of a 2D array. Two dimensional array in C programming is

Codes Convert Binary Number to Decimal -
C Programming code take a binary number and store it in the variable j. And initialize the variable decimal_val to zero, variable base to 1. Obtain the remainder and quotient of the...

Find the Largest Two Numbers in an Array -
C Program code calculates the largest of two numbers in a given Array. First it accepts an array, then compares the elements and finds which is the largest two element in a given...