# C Programming Code Examples

## C > Arrays and Matrices Code Examples

### c programming to check sparse matrix

Implement Slicker Algorithm that Avoids -
Program to find the "Area of Ploygon" using "Slicker Algorithm". algorithm assumes the usual mathematical convention that positive y points upwards. Enter the number of points

C program Swap Numbers in Cyclic Order -
C code three variables entered by the user are stored in variables x, y and z respectively. Then, these variables are passed to function cyclicSwap(). Instead of passing the actual...

C++ Program to Perform Greedy Coloring -
Give all its neighbouring colours a vertex, but before that keep a check on used colours and unused colours. 'Only assign', unused colours to the upcoming vertex. The problem takes a

Print Armstrong Numbers from 1 to 1000 -
Program code print Armstrong Number from 1 to 1000. An Armstrong number is an n-digit base b number such that the sum of its (base b) Digits Raised to the Power n is the number

Finds the Sum of ASCII Values of All Chars -
Program takes a 'string as input' and finds the sum of 'ASCII values' of all characters in given string. Take a string as "input & store" it in the array string[]. Initialize the variable sum to '0'.

C++ Performs Searching Based on Locality -
Searching based on Locality of Reference and also called Principle of locality. So Depending on the memory access pattern data elements are "reallocated". In general search, 80% time

Count Numbers of Words Digits & Vowels -
Program find number of words, blank spaces, Special symbols, Digits, "Vowels" by pointers. We are going to accept string use 'gets()'. We are not using scanf() to accept string because

Find the Number of Integers Divisible by 5 -
C Program to which calculates the number of integers divisible by 5 in the given range. This C program takes the range as input and finds the number of integers divisible by 5 in range.