Sunday, 13 July 2014

How to Compile C Programs (Amazing)

How to compile C programsIn many of my previous posts especially in the Programming section, I have used C as the programming language for writing the programs. If you’re new to C programming and find it difficult tocompile the C source codes then this post is for you.
Here is a step-by-step procedure to install Borland C++ compiler 5.5 on your PC and compile the C programs.

How to Install Borland C++ compiler?

Follow the below steps to install Borland C++ compiler 5.5 on your PC:
  1. Download Borland C++ compiler 5.5 (for Windows platform) from the following link:
  2. After you download, run the file C++5.51.exe. The default installation path would be:
    C:\Borland\BCC55

How to configure Borland C++ compiler?

Here is a step-by-step instruction on how to configure the compiler:
  1. After you install Borland C++ compier, create two new Text Documents.
  2. Open the first New Text Document.txt file and add the following two lines into it:
    -I”c:\Borland\Bcc55\include”
    -L”c:\Borland\Bcc55\lib”
    Save changes and close the file. Now rename the file from New Text Document.txt tobcc32.cfg.
  3. Open the second New Text Document (2).txt file and add the following line into it:
    -L”c:\Borland\Bcc55\lib”
    Save changes and close the file. Rename the file from New Text Document (2).txt toilink32.cfg.
  4. Now copy the two files bcc32.cfg and ilink32.cfg, navigate to C:\Borland\BCC55\Bin and paste them.

How to Compile the C Source Code (.C files)?

Here is a detailed instruction on how to compile C source codes:
  1. You need to place the .C (example.c) file to be compiled in the following location:
  2. C:\Borland\BCC55\Bin
  3. Now go to the command prompt (Start->Run->type cmd->Enter)
  4. Make the following path as the present working directory (use the CD command):
  5. C:\Borland\BCC55\Bin
  6. To compile the file (example.c) use the following command:
  7. bcc32 example.c
  8. Now if there exists no error in the source code, you’ll get a compiled executable module (example.exe) in the same location (C:\Borland\BCC55\Bin).
  9. Now you have successfully compiled the source code into an executable file(.exe file).
NOTE: The above tutorial assumes that you’ve installed the compiler onto the C: drive (by default)

What is MD5 Hash and How to Use it (Interesting)

In this post, I will discuss about one of the interesting cryptographic algorithm called MD5 in a very simple and easy to follow manner. In addition to understanding what is MD5 hash, you will also learn how to make use of this algorithm in your daily life.

What is MD5 algorithm?

MD5 which stands for Message Digest algorithm 5 is a widely used cryptographic hash function that was invented by Ronald Rivest in 1991. The idea behind this algorithm is to take up a random data (text or binary) as an input and generate a fixed size “hash value” as the output. The input data can be of any size or length, but the output “hash value” size is always fixed. Here is an example of MD5 Hash function at work:
MD5-Hash Function Example
As you can see from the above example, whatever the input size you give, the algorithm generates a fixed size (32 digit hex) MD5 hash. You can even try this on your own using the MD5 hash generator tool here.

Applications of MD5 Hash:

Before I tell you about how to use MD5, I would like to share one of my recent experience which made me start using MD5 algorithm.
Recently I made some significant changes and updates to my website and as obvious, I generated a complete backup of the site on my server. I downloaded this backup onto my PC and deleted the original one on the server. But after a few days something went wrong and I wanted to restore the backup that I downloaded. When I tried to restore the backup, I was shocked! The backup file that I used to restore was corrupted.
That means, the backup file that I downloaded onto my PC wasn’t exactly the one that was on my server. The reason is that there occurred some data loss during the download process. Yes, this data loss can happen often when a file is downloaded from the Internet. The file can be corrupted due to any of the following reasons:
  • Data loss during the download process, due to instability in the Internet connection/server.
  • The file can be tampered due to virus infections or
  • Due to Hacker attacks.
So, whenever you download any valuable data from the Internet, it is completely necessary that you check the integrity of the downloaded file. That is, you need to ensure that the downloaded file is exactly the same as that of the original one. In this scenario, the MD5 hash can become handy. All you have to do is generate MD5 hash (or MD5 check-sum) for the intended file on your server.
After you download the file onto your PC, again generate MD5 hash for the downloaded file. Compare these two hashes and if they match, that means the file is downloaded perfectly without any data loss.
A MD5 hash is nothing but a 32 digit hexadecimal number which can be something as follows:

A Sample MD5 Hash
e4d909c290d0fb1ca068ffaddf22cbd0
This hash is unique for every file irrespective of its size and type. For example, two different executable files (.exe files) with the same size will not have the same MD5 hash even though they are of same type and size. So MD5 hash can be used to uniquely identify a file. The same thing applies even for messages where each message that was sent and received can be verified using the MD5 hash.

How to use MD5 Hash to check the Integrity of Files?

Suppose you have a file called backup.tar on your server. Before you download, you need to generate MD5 hash for this file on your server. To do so use the following command:
For UNIX:
md5sum backup.tar
When you hit ENTER you’ll see something as follows:
e4d909c290d0fb1ca068ffaddf22cbd0
This is the MD5 hash for the file backup.tar. After you download this file onto your PC, you can cross check its integrity by again re-generating MD5 hash for the downloaded file. If both the hash matches then it means that the file is perfect. Otherwise it means that the file is corrupt. To generate the MD5 hash for the downloaded file on your Windows PC use the following freeware tool:
I hope you like this post. For further doubts and clarifications, please pass your comments. Cheers!

How to Recover Deleted Files from Windows and Mac

Have you accidentally deleted your files from the hard disk? Do you desperately need to recover the deleted files back in the original form? Well, you need not panic!
It is possible to recover the deleted files or data back from the hard disk  (even after you have Shift+Deleted)  provided you act as soon as you realize that the files are deleted and use the best deleted files recovery software.
In this post you will find a detailed information on how to recover the deleted files back from your Windows PC or Mac.

How Deleted File Recovery Process Works?

When you delete a file from your computer, (or even from the recycle bin) the file is not actually deleted. Unlike what most people think, whenever a file or data is deleted from your computer, it is not permanently vanished or dropped out from your hard disk. Even though the files appear to have been deleted, they can still be recovered successfully.
Let’s take up a small example of a book containing 50 pages. Suppose when you delete the page 25, assume that only the entry in the index which points to the page 25 is deleted and not actually the page 25 itself. Likewise, when you delete a file from your hard disk, only the pointer which points to this file is removed and not actually the file itself. This file still exists intact and is 100% possible to recover it back in the original condition. In this condition, the file becomes invisible and hence appears to have been deleted.
Recovering the deleted files 100% back in the original condition is very much dependent on the efficiency of the data recovery software you use. So, it is necessary to make a right choice when it comes to the selection of file recovery software.
Today, there exists hundreds of data recovery tools and software programs on the market which boast to recover 100% of all the deleted files back in the original condition. But in reality, most of these programs are neither effective nor capable of recovering your files back. So, when it comes to Data Recovery, I recommend the following program as the best:
Stellar Phoenix is one of the best company specializing in deleted files recovery services and solutions since 1993. Stellar’s Data Recovery Solutions encompasses a wide range of software for almost any data loss situation ranging from accidental formats to virus attacks to software malfunctions. Hence, Stellar provides the best tools to recover deleted files with over 1,000,000 satisfied customers across 137 countries.

What are the Chances of Recovering my Files Back?

Since the operating system doesn’t immediately re-use the space from the deleted files, it is most certainly possible to recover the deleted files back in 100% original condition. It may take up a very long time for those files to be completely deleted since the modern hard disks have ample capacity. Hence the chances are too less that the space from the deleted files are re-used immediately.
So, it is really worth to try out the file recovery software like Stellar Data Recovery for Windows orStellar Data Recover for Mac. Some files are reported to have been recovered even after years of its deletion. However, for the best results, it is recommended that you use the file recovery software as immediately as possible.

Recovering the Deleted Files:

In order to recover the deleted files, all you need to do is perform a scan (search) for the deleted files using a File Recovery Software. Please be informed that there is no manual way to recover the deleted files. The Phoenix Data Recovery software performs a thorough scanning of the hard disk sector by sector and will locate the existence of deleted files to restore them back in the original condition. It is the only software that supports 185 popular file types including Windows NT Registry, JPEG, MP4, GIF, BMP and MS Word files. The software offers rich graphical support and incorporates advanced scanning methods to completely scan and recover deleted files from your hard drive. With this recovery software, it is possible to
  • Recover FAT16, FAT32, VFAT, NTFS, and NTFS5 file system partitions
  • Recover deleted emails
  • Recover deleted documents
  • Recover deleted photos
  • Recover deleted music
  • Formatted Hard-Drive recovery
  • Recover files from USB Drives, CDs, DVDs and memory cards
  • Recover almost all the camera format files
Visit the following links for more information on Stellar Data Recovery:

How to Completely Erase a Hard Disk Drive

A new year has begun and perhaps you have decided to perform a system upgrade or get rid of your old computer system and purchase a new one. But, before you sell or donate your old computer, it is very much necessary to completely erase your hard disk drive.
Yes, every one of us are aware of this fact and so, we delete the contents of the hard disk either by using the DELETE key on our keyboard or by Formatting the hard disk.

Deleting and Formatting – Just Not Secure Enough!

But the fact is, the data will still be on the hard disk even after deleting it or formatting the hard disk. Using the delete key on your keyboard will only remove the shortcuts to the files making them invisible to users. Deleted files still reside on the hard drive and a quick Google search will show many options for system recovery software will allow anyone to reinstate that data.
Formatting the hard drive is a bit more secure way to erase the hard disk. Formatting a disk will not erase the actual data on the disk but only the address tables pointing to the data are dropped. It makes it much more difficult to recover the files. However, a computer specialist would be able to recover most or all the data that was on the disk before the reformat. For those who accidentally reformat a hard disk, being able to recover most or all the data that was on the disk is a good thing. However, if you’re preparing a system for retirement to charity or any other organization, this obviously makes you more vulnerable to data theft.

Completely Erase the Hard Disk through Disk Wiping:

So it is necessary for us to use a 100 percent secure way to erase the data from the hard disk drive. This way of securely erasing the data is called Disk Wiping. Disk wiping is a secure method of ensuring that data, including company and individually licensed software on your computer and storage devices is irrecoverably deleted before recycling or donating the equipment. Because previously stored data can be brought back with the right software and applications, the disk wiping process will actually overwrite your entire hard drive with data, several times. Once you format you’ll find it all but impossible to retrieve the data which was on the drive before the overwrite. The more times the disk is overwritten and formatted the more secure the disk wipe is.
There are a variety of disk wiping products available that you can purchase, or freely downloaded online to perform more secure disk wipes. One of my favorite disk wiping software is:
You have to use this tool by burning the iso image file onto a CD or by using a floppy disk. After burning this tool you have to boot your PC and follow the screen instructions to completely wipe out the data from your hard disk drive.