C Programming Source Code

Solving the Knapsack Problem with Code Examples

Solving the Knapsack Problem with Code Examples

The Knapsack Problem is a classic optimization problem in computer science and mathematics. The goal is to maximize the value of items placed in a…

LRU and FIFO L1 Cache Implementation using C

This is a C program to demonstrate cache mechanism by simulating a cache in C. The source code can run in any C Compiler with…

Random Number Generation in C/C++: Tricks for Generating, Seeding, and Working with Random Numbers

C Standard Library provides two different methods to generate random numbers. They are: rand() and srand().

C Algorithms Library

This article is about a collection of common Computer Science algorithms which may be used in C projects. The C Programming Language has a much smaller Standard…

The “Hello, World!” Program in C

This is a simple “Hello, World!” C program to display "Hello, World!" text on the computer screen or display device. Typically, the best way to…

C Implementation of Base64 Encoding and Decoding

Base64 encoding and decoding schemes are commonly used to encode binary data. Normally this is required when textual data needs to be transferred over the…

Kruskal’s Algorithm

This is the implementation of Kruskal's Algorithm in C and C++ Programming Languages. This algorithm is directly based on the generic MST (Minimum Spanning Tree)…

Porter’s Algorithm in C

Originally written in 1979 at Computer Laboratory, Cambridge (England), it was reprinted in 1997 in the book "Readings in Information Retrieval". Initially it was written…

Counting Words, Lines and Characters in a Text File in C

This is a small C language program that can read a text file. The program is given file name as command parameter and it reads…

C Program of Library Management System

This is a C program to implement Library Management System by which a librarian can operate a simple library. It uses Linked List, Stack and…