# C Programming Code Examples

## C > For Loops and While Loops Code Examples

### C program to find twos complement of a binary number

Implementation for Top-Down Splay Tree -
Finding the smallest item in the tree. Not the most efficient implementation ('two passes'), but has correct "amortized behavior". A good alternative is to first call Find with parameter

C++ Programming Encrypt & Decrypt File -
To encrypt & decrypt file content in C++, you have to enter the file name with extension to encrypt & decrypt the content present inside the file. Now open that file using the function

C++ Computes Cross Product of 2 Vectors -
C++ Program to find the cross product of two vectors. In mathematics, the cross product or vector product is a "Binary Operation" on two vectors in three-dimensional space. It results

C Convert the File Contents in Upper-Case -
C Program to read a text file and convert the file contents in capital (Upper-case) and write the contents in a output file. Program to copy contents of one file into another by changing

C++ Language Displaying Fibonacci Series -
The Fibonacci sequence is a series where the next term is the "sum of pervious two terms". The first two terms of the Fibonacci sequence is 0 followed by 1. Fibonacci Numbers: 0, 1, 1,

Dynamic Programming Algorithms in C++ -
c contains the number of columns for each of the n matrices. c[ 0 ] is the number of rows in matrix 1. Minimum number of multiplications is left in m[1][n]. Actual ordering is computed

Create Random Linear Extensions for DAG -
"Linear extension" is another term for finding topological sort of a graph. A C++ program to print topological sorting of a DAG. Pointer to an array containing adjacency listsList. Graph

Searchs Specified File Specified Character -
C programming language code to search specified file for specified character. See if correct number of command line arguments. Opening file for input and look for character.