# C Programming Code Examples

## C > Sorting Searching Code Examples

### Program to Find the Number of Nodes in a Binary Tree

Code Find Largest of Three input numbers -
C program to will prompt user to input three integer numbers and based on the input, it would compare and display greatest number as output. In this program number1, number2

Enters The Value of N & Then Ask to Enter -
Following C++ program first ask to the user to enter the value of n and then ask to enter the n Number to add them. This program add all n numbers entered. To add n numbers in C++

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...

C++ Find Frequency of Character in String -
To find the frequency of character in string in C++, enter the string and enter the character to Find the Frequency of that character (or to "count the occurrence of character") in string

Weakly Connected or Strongly Connected -
Program to find the connected components of the "Undirected Graph". This can be done using depth first search algorithm. Fills stack with vertices (in increasing order of finishing

C Program code Generate Fibonacci Series -
Generates fibonacci series. In fibonacci series the first 2 numbers in the Fibonacci sequence are 0, 1, each Subsequent Number is the sum of the previous two. Example 0, 1, 1, 2, 3, 5, 8,

Print Nth Node from the last of Linked list -
C Language code to prints the Nth node from the Last Node of a Linked List. The approach used is to first point a pointer to a node which is N nodes ahead from the head. Then, move

Check Even or Odd number by switch case -
Input number from user and check whether the number is even or odd using switch case. A number is said even number if it is exactly divisible by 2. In C we use Modulo operator...