# C Programming Code Examples

## C > Mathematics Code Examples

### C Program for Beginners: Area of Right Angled Triangle

Concatenate Two Strings strcat() Function -
C program code 'Concatenate 2 strings' using strcat() library function. Logic to concatenate 2 strings in C Programming. Enter first string, enter second string and Concatenate str1 str2

C Language Program Implement Cyclesort -
C Program implements 'Cyclesort'. Cycle sort is an in-place, unstable 'Sorting Algorithm', a comparison sort that is theoretically optimal in terms of the total number of writes to the

Volumes & Areas of geometric shapes in c -
C program coding to calculate area, volume, perimeter of a particular geometric shape. Square, rectangle, circle, triangle, rhombus, parallelogram, trapezium, quadrilateral,...

C Count Occurrences of a Word in a String -
Write a C program to Count Occurrences of a word in a given string using loop. Input string and word from user. Get the total number of occurrences of a word in a string. Print count

C Code Print all Even numbers from 1 to N -
C Language program print all even numbers from 1 to n using for loop. So first let us talk about the easiest way to print even numbers. If I ask you to list all even numbers from 1 to

C program code Self-Referential structure -
Buffer for ungetch, next free position in buf, word frequency count, getword: get next word or character from input, addtree: add a node with w, at or below p, a new word has

Find the two Elements such that their Sum -
Initialize the array named array[] with the random values. Call function minabsvaluepair and pass array and its size as parameters. In the function definition receive parameters...

Find the Trace & Normal of a given Matrix -
C Program find the trace & normal of a given matrix. Trace of the matrix is the sum of the elements of the main diagonal i.e diagonal from the upper left to the lower right of a...