Pages

Showing posts with label C Programming. Show all posts
Showing posts with label C Programming. Show all posts

Monday, 7 March 2011

Learn C programming at iT FuNdA: Lesson 2

Hi dudes!
        Hope you studied and enjoyed previous lesson. In previous lesson we studied that we need a Compiler to translate our C code into Machine executable code and we will use Turbo C 3.0. So in this very lesson we discuss the process of installing and Configuring Turbo C 3.0 on your machines.

Installing and Configuring Turbo C 3.0:

Installing Turbo C 3.0:
       First you have to download Turbo C 3.0 here is the link to download Turbo C3.0                        Click here to Download Turbo C 3.0


    After downloading first of all unzip it and then copy the folder TC to your desired drive I selected C drive
    so I copied the folder naming TC into my C drive in my PC
    Now first go to "C:\TC\BIN"   and double click on icon naming "TC.EXE" 




                                                       In Bin Folder Open TC.EXE


    Now After double clicking on that highlighted icon you will see the first screen of Turbo C3.0 which look  
    like the figure given below. This is Called Integrated development Environment (IDE) of Turbo C3.0.
    In which programs are written, compiled and debugged.



                                                                  IDE of Turbo C 3.0


    Now you have to set directories for input, output and header files. For this purpose click on Option in Menu Bar and then click on directories that appears in the drop down menu which appears after clicking on Options. Then set the Include, Library, Source and output directories as per your requirements but as I told you earlier that I have installed TC in my C drive, so I set these directories as per my PC setting.  Follow the figures given below.

                                                                    Click on Options


                                                                  Click on directories



                                                                 Set directories



  Now its over you have installed and configured Turbo C3.0 on your PC. You can use this IDE to write new    
  programs. In our next lesson we will learn to write our first C Program.

   If have any question please feel free to ask i will try my best to satisfy you.

                                                                     Good bye 
Read More »

Friday, 4 March 2011

Learn C programming at iT FuNdA: Lesson 1

Hi dears!
            With the name of Almighty Allah I am starting first ever lesson of C Programming. If anyone really want to learn programming in C. He/She should read lesson carefully and must practice it.

   So Starting our first lesson with basic concepts from Programming.

PROGRAMMING:
            The process of instructing computer to do something is Programming. Computer programming is a set of instruction which causes computer to do some process.
For Example if we want to add two numbers we should instruct computer through some programming language so that computer can understand our instruction and add two numbers.

PROGRAMMING LANGUAGE:
              The artificial language that have some rules called syntax following which we can write Programs.

TYPES OF PROGRAMMING LANGUAGE:
              There are three main types of Programming languages based upon understanding level be human and computer. These are    1. Low level Language    2.Middle level Language   3. High Level Language

Low Level Language:
            The language which is directly understandable by computer without any translation is called low level language also called as Machine language. It is the language of 0's and 1's. you often seen a computer code written as 111001010100101 it is written in machine language. Machine language is machine dependent. It varies from machine to machine.

Middle Level Language:
          This Language is the combination of machine code and human language words specially English. Example of middle level Language is Assembly Language.Middle Level Languages need a bit of translation because computer cannot understand English oriented words.

High Level Language:
          This type of languages are purely composed of human oriented Languages specially English. High level Languages must have to be translated in machine code before running or executing. Examples of High level Languages are C, C++, Java, C# etc.

Translators:
         A software That translates high level code into machine code i-e if one write a program in C, he/she must have to use translator to translate his/her code into machine code so that computer can understand instruction and can execute them.

Types of Translators:
           There are two types of translators i-e Compiler and interpreter. The difference between compiler and interpreter is that Compiler translates the whole code at once but interpreter translates code line by line means one line at a time.

                   Now Coming to our Desired Topic Programming in C  

WHAT IS C?
           C is a structured, procedural programming language that has been widely used both for operating systems and applications and that has had a wide following in the academic community. Many versions of UNIX-based operating systems are written in C. C has been standardized as part of the Portable Operating System Interface

Now what is Structured and Procedural Programming?

        Procedural means in Type of programming when control goes through instruction by instruction to end. Means from Start to bottom control transfers from one statement to another in a sequence no alteration or change in this sequence.

      Structured means type of Programming in which Blocks of codes are created called modules or function or methods which are called when needed and no matter how many times you called them they are written only once. This concept makes C programming very easy, simple and understandable.

          C language is developed by Dennis Ritchie at Bell Laboratories in mid 70's. Although they developed C for system programming but C has proved to be a powerful, flexible language that can be used for developing a variety of applications. C is very popular among Personal Computer Programmers because it is relatively small and requires less memory than other programming languages. Although C is high Level language, but it is very close to assembly language, which increase efficiency of C programs.

Compiler for C:
      As aforementioned C is a high Level language so it needs a Compiler to translates codes into machine language so that computer can understand it and can execute it. There are a variety of compilers for C in market. Some are as under

Microsoft Visual Studio. 
Turbo C
Borland 
GCC GNU
and so on
.
            I like Microsoft Visual Studio and Turbo C very much because of their user friendly environment. WE will use Turbo C 3.0. For Learning C in this tutorial.



So dudes this is Our First Lesson of C Programming. Hope you all understand and enjoy the whole course and feel free to ask any question about lesson. Good bye
Read More »

Learn C programming at iT FuNdA


C Made Easy programming at iT FuNdA :

Dudes Here I m starting lessons for C Programming for absolute beginners. I will post lesson by lesson C Programming and anyone can ask me question frankly about any confusion in C Programming. I will write all lesson as readers have no knowledge of Programming. I read many books about C Programming , in these books normally writers try to confuse readers by relating advanced concepts in earlier chapters. You will see that i will try my best to make C Programming very easy for people having no Programming background. In Sha Allah
Read More »