C Programming Code Examples
C > If Else and Switch Case Code Examples
C program to find maximum between two numbers
C Language program Print Pascal Triangle -
C program print pascal triangle up to n rows. Pascal triangle is a triangular number pattern named after famous mathematician Pascal. Where n is row number and k is term of that
Program to Implement Ternary Seach Tree -
Program demonstrates the implementation of Ternary Seach Tree. Create a new ternary search tree node. And insert a new word in a Ternary Search Tree. Search a given word in
Calculates Sum of Odd and Even Numbers -
C program code find the sum of odd and even numbers from 1 to N. Take Number N upto which we have to find the sum as input. Using for loop take the elements one by one from 1
Aho-Corasick Algorithm String Matchings -
"Aho-Corasick" string matching algorithm is a 'searching algorithm', it is a kind of dictionary matching Algorithm that locates elements of a finite set of strings (the "Dictionary") within
C Program Reverse a String Use Recursion -
Program reverse the string 'Using Recursion'. C program uses recursive function & reverses the string in the same 'Memory Location'. Eg 'Superman8' will be reversed to '8namrepuS'
C Code If ch is a printable character or not -
C program code asking the character from user to enter. Returns nonzero if character is a printable character, including a space; otherwise zero is returned. It's printable char.
C++ Program to Solve Knapsack Problem -
This is a C++ Program to 'knapsack problem' using dynamic programming. The knapsack problem or "rucksack problem" is a problem in combinatorial optimization: given a set of
C++ Compute Power with pow() Function -
In this 'C++' sample, you will learn to compute power to a number manually, by using 'pow()' function. Takes two numbers from the user (a base number and an "exponent") & calculates