PROGRAMMING EXAMPLES




C Programming Examples

C Language Implementation of Algorithm and Data Structures

The C programming language includes a very limited number of standard libraries or common data structures and algorithms in comparison to other modern programming languages such as Java, C# or Python. This is a collection of common algorithm and data structure implementation in C which may be used in C projects.

read more

C Language 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 network or similar media and make sure that data is transferred without any modification. Base64 is commonly used...

read more

C Language Implementation of Porter’s Algorithm

This is ANSI C programming implementation of the Porter stemming algorithm. It may be be regarded as canonical, in that it follows the algorithm presented in Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, no. 3, pp 130-137.

read more

Reading Files

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 the file line by line. The program will prints out number of characters and words in each line. The program will also prints out the number...

read more

C Program of Library Management System

This is a C program of Library Management System by which a librarian can operate a simple library. User can add multiple students, update their records and issue multiple books. This C Program shows different information about library including numbers of books and...

read more

C Program to calculate Factorial of a Number

This C program calculates the the factorial of an integer number entered by the user. The function uses for loop to calculate the factorial and returns the number. Program terminates if a non integer number is entered. This C language program uses for loop in just a...

read more

C++ Programming Examples




Add time using structures in C++

Write a program having a structure named Time which has three integer data items i.e. hour, minute and second. The task is to add the variables of the Time data type though a function void AddTime(Time *time1, Time *time2) which takes as arguments the addresses of two...

read more

Common Text Transformation Library

Common Text Transformation Library, CTTL for short, is a set of C++ classes and functions to understand and modify text data. The library implementation is based on STL classes and algorithms. The library provides components for creating lexical analyzers making...

read more

C++ Program to demonstrate Inheritance

This is a simple C++ Program to demonstrate Inheritance. Simpler methods in the classes have been changed to inline code to shorten the file considerably. In a practical programming situation, methods that are this short should be programmed inline since the actual...

read more

C++ Program to demonstrate Function Name Overloading

This is a simple C++ Program to demonstrate Function Name Overloading. An example of function name overloading within a C++ class many_name is used in this program. The constructor is overloaded as well as one of the methods to illustrate what can be done in C++...

read more

Number Conversions

This is another one of my numerical analysis university assignments. It is an extension of binary to decimal conversion code. The program converts a number in any base to a number in any other base. The user inputs the original number, the base it was written in and...

read more

Exception Handling

Error recovery is a fundamental concern for every program you write, and it's especially important in C++, in which one of the goals is to create program components for others to use. To create a robust system, each component must be robust.The goals for exception...

read more



0 Shares
Share
+1
Tweet
Share
Stumble