C Program to print Pascal’s Triangle

Pascal Triangle is started by 1, then followed by The binomial coefficient (n,k), where n is the non negative integer and k is the integer between 0 and n. Pascal triangle is the triangular array. Read more about C Programming Language. /*********************************************************** * You can use all the programs on www.c-program-example.com * for personal and …

C Program to print Floyd’s triangle

Floyd’s triangle is the right angled triangular array of natural numbers. Here we used the nested For loop to print the Floyd’s triangle. Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* for personal and learning purposes. For permissions to use the* programs for commercial purposes,* contact [email protected]* …

C Program to calculate the total execution time of a program.

C Program to calculate the total execution time of a program. Here we used the “time.h” preprocessor. In this program we used the clock_t variables start and end , They starts the time counter and ends the counter. Execution time of a program is useful to calculate the efficiency of the program. Read more about …

C Program to sort the string, using shell sort technique.

C Program to sort the string, using shell sort technique. Shell sort is the one of the oldest sorting technique, quite well for all types of arrays in c. The shell sort is a “diminishing increment sort”, better known as a “comb sort” to the unwashed programming masses. The algorithm makes multiple passes through the …

Merge Sort in C – Program with Example and Complexity

Merge sort is a classic divide and conquer sorting algorithm. It splits an array in half, recursively sorts each half, then merges the two sorted halves back together. Unlike bubble sort or insertion sort, merge sort guarantees O(n log n) performance in all cases — best, average, and worst. It is the algorithm of choice …

Insertion Sort in C – Program, Algorithm and Complexity

Insertion sort is one of the simplest sorting algorithms and works exactly the way you sort a hand of playing cards. You take one card at a time and insert it into its correct position among the cards already sorted in your hand. It sorts the array one element at a time, building the sorted …