# C Programming Code Examples

## C > Linked Lists Code Examples

Page 1 Page 2

Page 1 Page 2

Write the Number as the Sum of Numbers

Algorithm "Counts the partition" of the given number. There is no straight method to count a total number of the partition so we need to 'Generate and Count' them. Time complexity

Check Whether a Number is Prime or Not

A prime number is a positive integer which is divisible only by 1 and itself. Example: 2, 3, 5, 7, 11, 13... If the for loop terminates when the test expression of loop i <= n/2 is false, it is a

C Codes Calculates the Area of a Triangle

This C Program code calculates the area of a triangle given it's three sides. The formula or algorithm used is: Area = sqrt(s(s - a)(s - b)(s - c)), where s = (a + b + c) / 2 or perimeter / 2. &

Code convert numbers to roman numerals

Take a decimal number as input. Check if the number is greater than 1000 or 900 or 500 or 400 or 100 or 90 or 50 or 40 or 10 or 9 or 5 or 4 or 1. If it is, then store its equivalent roman...

C Programming language example to display decimal equivalent of a input binary number. What will be the length of input no.? Don't exceed input from your input limit or 5 digits

C Find Power of a number using Recursion

First give a meaningful name to our recursive function say pow(). The function must accept 2 numbers i.e. base. exponent and calculate its power. Hence, take 2 parameters for base

C++ Two-Dimension Transformations In

This C++ Program code example deals with all two-d transformation such as translation, 'scaling', 'rotation', 'reflection', 'shearing' in homogeneous coordinates. Transformation

C++ Compare Binary & Sequential Search

A 'function implementing' Binary search on a 'Sorted array'. Every time this function called, counted as a iteration of 'binary search'. So if value is "Less than Value" at start index more