Pages

Monday, April 29, 2013

EXECUTION OF C LANGUAGE

Hi,
     This post is common for all the PLATFORMS (i.e) Operating Systems.



     Before getting in to programming you should know how it works...

               The program which you are going to create is called source code.

               Save the created program(source code) & compile the source code
               according to the  platform in which you are in.

      At that time the C compiler will convert your source code into the compiler understandable code
      (i.e) file_name.bak or file_name.obj file which will be automatically created in BIN folder for
      running your program.

      When you run the program the file_name.bak or file_name.obj is taken by the interpreter to run the program.

      Will get back to u soon.....

Saturday, April 27, 2013

INSTALLATION WITH A SIMPLE PROGRAM IN LINUX

Hi,
     This post will make you to learn how to run a sample program in LINUX platform.

You may use any kind of LINUX operating system (i.e.) RED-HAT , UBUNTU , FEDORA , etc,.

You don't need to install C application in LINUX operating system because it would have been already installed at the time of OS installation.

1. Open a text editor, for an example gedit .

2. Type the sample code to check whether the C application works correctly.

CODE:
#include<stdio.h>
int main()
{
      printf();
      return 0;
}

4. Save the file in the root directory with the extension .c

5. For compiling and running a C-Program open the terminal.

6. Type the command in terminal to compile and run.

     COMPILE:

     cc source_file_name.c

      RUN:

      ./a.out

Wednesday, April 24, 2013

A SAMPLE PROGRAM for TURBO C++

This post will help you to start the great C-PROGRAMMING

Open the TURBO C++ application using TC.exe. The window would appear as below.


1.Open a new file File => New.


2.Type the given code in that editor

#include<stdio.h>
int main()
{
     printf("Welcome to Learn C Language");
     return 0;
}

3.After typing the above code in blue screen, save it using File => Save.  A window will prompt for the file name. Give the file name as you wish,with the extension .c. Save the program in the BIN folder which you could open easily for the later use. File name should have the maximum length of 8-characters.


4.Compile the program using Compile => Compile in the menu bar.


You will get the status as success after the compilation process get over.
Press Enter.


 5.Run the program using Run =>Run in the menu bar.


6.Output window will not be viewed after running a program. To view the output screen,
Windows => User Screen  and press Enter.

OUTPUT SCREEN:




[You could give any content inside the double quotes instead of "Welcome to Learn C Language" to get it printed.]

Above one is the procedure for a program.
Details about each line of the program [what is what?] will be discussed in the coming posts.

Learn some short-cut keys that would save your time.

F2                     - Saving a file.
F3                     - Opening a file.
Alt+F3              - Closing a file.
Alt+F9              - Compiling a file.
Ctrl+F9             - Running a file.
Alt+F5              - Viewing Output Screen.
Alt+x                - Quit or Close TURBO C++.

Will get you back with more technically and practically in the next post...

C Installation

This post will help you to get through the installation process in various platforms like Windows,LINUX,MAC,etc.,

C is an application software that will be easy to install as any other software, so there wont be any big issue in installing.

Windows 2000 or Higher(excluding 7 and 8):

There are different kinds of compilers to run C program where each is an unique one.

Some of the compilers are
  • TURBO C
  • TURBO C++
  • Dev CPP
The best compiler to start C is TURBO C+, the advanced version of TURBO C. It is a freely available software which you can get it through Google search.

Download the software...

After downloading you could identify a file as INSTALL.exe as shown below. Now make a double-click on it.


Press Enter to continue the installation process.

You will get a prompt window as shown below in which you have to specify the source drive name. Specify it and press Enter to continue.

Example:If you had downloaded in D:\ drive then enter the source drive name as 'D' or specify the drive in which you have downloaded. I've kept the downloaded file in F:\ so i have specified as F drive below.


Next window will show you the complete path in which you had downloaded. Now
press Enter.


In the next window "START INSTALLATION" will be highlighted, if you press enter then "TURBO C++" will be installed in the source drive which you had already specified( F- Drive for me as i had specified already).

[If you like to change the drive where it should install, then "Directories" field could be used by selecting it through arrow keys.]

Press Enter with the "START INSTALLATION" option.
I
The installation will get over in few seconds.After the completion of the installation you could open the TURBO C++ application using the following directory.
                                  Installation Drive:\TC\BIN\TC.exe.

Now the application will get successfully opened as shown below.

Windows 7 and 8 user has full-screen difficulty, that could be solved by using the simulator.

Will meet you in the next post with a sample program...

Tuesday, April 23, 2013

Introduction To C Language

Know how it gets evolved...

          This is a post which helps you to know something about C language.

Founder of C  - Denis M Ritchie

Year                 - 1972 (1969-1973)

Evolved from  - B(B CPL & CPL),FORTRAN,ALGOL,Assembly.


C-Language is the structured language which attracted more programmers in the beginning and became the most popular language of all times.
Denis, during his research felt that the programming language need to be FORMAT-FREE that means it need not be intended based on blocks and terminations. If you couldn't get this one don't worry it will be detailed in the later post.

&

C Language is a CROSS-PLATFORM, that means it could be utilized in more than one platform like Windows, Linus, Mac and etc., It will also be discussed in the forthcoming post.

Catch you in the next post soon....