# C Programming Code Examples

## C > Conversions Code Examples

### C Program to Convert Binary to Octal Number System

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 Computing the Product of Two Matrices -
Code computes the product of two matrices. This program accepts the 2 matrices and then find the product of 2 matrices. Develop functions to read a matrix, display a matrix

Program Code Find Area of Parallelogram -
C program to find area of Parallelogram. This C code Calculates the 'Area of Parallelogram'. The formula used in this c program are Area = b*a where b is the length of any base, a is the

C Programs Second Largest Array Element -
Finding the second largest value in an array is a classic C array program. Program gives you an insight of iteration, array and conditional operators. We iteratively check each element

C++ Program Codes Print Prime Numbers -
For example, to print prime number between '3 to 29', here 3 is the starting number and 29 is the ending number, enter the starting and ending number to find and print all the prime

Code Extract Last Two Gigits of the year -
This c language program takes any year as input and prints its last two digits. Take any year as input. Divide the input by 100 and obtain its remainder. The remainder got is

Find the Sum of All Nodes in a Binary Tree -
Program code to find the sum of all nodes in a binary tree. Structure to create the binary tree. Inserting elements in the binary tree. C Code to dynamically create new nodes. Code

C Language Program Print Reverse Array -
Print an array in reverse order, we shall know the length of the array in advance. We can start an iteration from length value of array to zero and in each iteration we can print...