Directory Structure

A small script to show all the Directories and Files in a specified Drive or Directory. It shows all the files/folders in a tree with the file size, last modified and other file attributes. It is just like the DIR/P command of the DOS. [sourcecode...

Reading Text Files

It contains a program that is given as command parameter the name of a text file, say, temp.dat. It will read each line of temp.dat and print out in correspondence the number of characters and words on that line. At the end it will print out the number of lines that...

Copying One File to another in C

This is a simple C program that copies the contents of one file onto another file. It is similar to Unix’s cp  command. This C program is called with two parameters i.e. the names of two files. The contents of the file referenced in second parameter are copied onto the file which is referenced by first parameter. 

Fly away to your vacation

The object of the game is to get to your proper plane on time so you can fly away to your vacation. Of course there a few obstacles and problems along the way and they will be brought up at the appropriate time. It will be up to you to solve the puzzles associated...

Enumerated type variable

Example that uses an enumerated type variable. This example uses enumerated type is used in C++ in exactly the same way it was used in ANSI-C with one small exception, the keyword enum is not required to be used again when defining a variable of that type, but it can...

Calculate the SUM

This C Language program reads a sequence of positive integers from the console, given by the user, and prints them out together with their sum. Use a Sentinel value (say 0) to determine when the sequence has terminated. So wehenever the user will enter 0 the program...

Borland C/C++ compiler Interface

This is a Borland C/C++ compiler Interface using the graphics.h library. This program uses many functions of graphics.h library provided by C Language. like line(), setcolor(), outtextxy() etc… You can play around with this code to learn how to make simple and...

Small Help Dialog

A small help dialog in DOS mode graphics. It can b used in any application for help purpose or showing messages to the user. It uses the ASCII characters to build the windows shpe and then I have used the gotoxy() function to place the cusror at that location to print...

Graphics

Small C Language Program to show the drawing and filling of some basic shapes like rectangle, circle etc… with colors and different shades. First of all I have created a characters aray of patterns that will fill the drawing, then initialize the graphics mode...

C Programming Tutorials

The C programming language is a general programming language. It can be used to program anything, like computers, embedded systems, operating systems and computer applications. It is a structured and procedural programming language. In the beginning it was developed for UNIX, for system development but due to its ease of use and simplicity it has been used for application development. It is now being used at almost any computer platform and operating system. It is an excellent programming language for due to its simplicity of expression, the compactness of the code, and the wide range of applicability.

Quicksort implementation in C

Quicksort is a well-known sorting algorithm developed by C.A.R. Hoare: Quicksort. QuickSort is an efficient algorithm based on Divide and Conquer rule and is still a commonly used algorithm for sorting. It works by selecting a ‘pivot’ element from the array and partitioning the other elements into two sub-arrays and recursively sorting them.

TrueCrypt Free Open Source Encryption Software

TrueEncrypt is a free open Source Encryption Software written in C++ programming language. If you haven’t used TrueCrypt before but need to protect confidential information and documents then I can totally propose to use this Free Software. The latest version has the ability to encrypt the whole drive on windows operating system. So without the password (which you set to encrypt the drive), you can not run your windows operating system.

Print pyramids and diamonds in C Language

I have been receiving a lot of emails and requests through the forums and inline forums attached to the tutorials on my website C and C++ Programming Resources about how to print pyramids and diamonds in different formats using C program. This article demonstrates how...

Graphics Library (graphics.h) Reference (part 3)

In the previous two posts (Graphics Library Reference part 1 and part 2) I have discussed few important functions of graphics.h library in C Programming. As promised here is the sample C language program which will demonstrate the use of graphics functions using C language and draw some geometrical shapes on the console. If you have followed the previous two posts the you will not find the source code difficult to compile and execute. If you still experience any problems using the source code or compiling the code the please do let me know, and I will try to figure it out.