C Programming Code Examples
C > Beginners Lab Assignments Code Examples
C Programming Selection sort [linked list]
Load some random values into the linked list. Adds a node at the end of a linked list. If the list is empty, create first node. Go to last node. Add node at the end. Assign data to...
C Language Code Formula of Permutation
Permutation refers number of ways in which set members can be Arranged or Ordered in some fashion. The 'Formula of Permutation' of arranging k elements out of n elements is
Find the Length of Strings without strlen()
We are Counting the Number of characters in a given String to find out & display its Length on console. Upon 'execution' of this program, the user would be asked to enter string, then
C Program Check the String is Palindrome
C program code to 'Check whether a String' is palindrome or not without using loop. How to Check whether a string is 'Palindromic String' or not in C. Palindrome string is special string
C Code Finds the Sum of all Nodes in Tree
C Program finds the sum of all nodes in a tree such that any node is sum of values at left and right sub tree. Function to find depth of a tree. Function to modify the tree. Function to
Program to Generate All Pairs of Subsets
The "time complexity" of this algorithm is O (n*2^n). This algorithm takes the input of 'n' data element and prints unique subset pairs whose union gives the set. It generates 0 to
Reverse the Digits of a Number in 3 Steps
C programming code to reverse the digits of a number in 3 steps. Store number in form of string. Reverse string using strrev function. Convert string to number. Printing reversed
The C++ Booth's Multiplication Algorithm
"Multiply two Signed numbers" using Booth's algorithm. Booth's multiplication algorithm is a multiplication algorithm that multiplies two signed 'binary numbers' in two's complement