# C Programming Code Examples

## C > File Operations Code Examples

### Program that Merges Lines Alternatively from 2 Files & Print Result

```
```

```
```

C++ Programming Code Check Leap Year - Program checks whether an year ("integer") entered by the user is a leap year or not. All years which are "perfectly divisible" by 4 are leap years except for century years which is

Using the Bellman-Ford Algorithm to Find - Using the bellman-ford algorithm to find the shortest path between two vertices assuming that negative size edges exist in the graph. A Program to find the 'shortest path' algorithm

C Code Reverse the Stack using Recursion - C program code, 'using recursion', reverses a Stack content. Stack here is represented use a linked list. A Linked List is an ordered set of "Data Elements", each containing a link to its

C++ Code to List Files in Current Directory - To list and "display/print" all the files present inside the current directory in The C++, use a pointer say dir of DIR and the pointer say pdir of dirent to open and "read directory" to print

Program code to addition of two matrices - Before accepting the Elements Check if no of rows and columns of both matrices is equal. Accept the Elements in Matrix 1 and Matrix 2. Addition of two matrices. Print out the matrix

Using Binary Search Technique & Displays - To perform "Binary Search" in 'C++', enter the array size, enter the array elements. Now ask to enter an element that is going to be search to "start searching" that element using binary

If Any Graph is Possible to be Constructed - This algorithm takes the input of the number of 'Vertexes' and their corresponding degree. Checks various 'constraints', tries to build the graph. If it fails, no valid graph can be created