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 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 – Algorithm, Program, and Complexity

Merge sort in C is a classic divide-and-conquer sorting algorithm that guarantees O(n log n) time in all cases. It splits an array into halves, recursively sorts each half, then merges the sorted halves back together. Unlike bubble sort or insertion sort, merge sort never degrades to O(n²) — making it the preferred choice when …

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 …

C Program to sort a linked list.

Data structures using C, Linked list is a data structure in which the objects are arranged in a linear order. In this program, we sort the list elements in ascending order. 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 …

C Program to reverse the first n characters in a file.

C Program to reverse the first n characters in a file using the command line arguments. Here we read the file name and n are specified on the command line. If file exists, it reverse the n characters, else it gives the error message. Read more about C Programming Language . /************************************************************ You can use …