Showing posts with label Basics. Show all posts
Showing posts with label Basics. Show all posts

First Basic Program in C Language

Now we know about the basic structure of C Program. Hence we are able to understand how to write basic program in C Language.

So let us start to write our program to print Welcome to C Bhasha Gyan using the following steps-

1. Open Turbo C or any C Editor.

2. Now create new file either using Click on File Menu or Alt+F shortcut and than click on New              option after this New File is created.

3. Now you can start typing the code given below:

    //First Basic Program to Print Welcome to C Bhasha Gyan in C Language
      
    #include<stdio.h>
    
    int main()
   
    {
          printf("Welcome to C Bhasha Gyan");

          return 0;   
    }

4. After saving Compile the written code using Alt+F9 or click Compile Inside Compile Menu.

5. Compiling result window will appeared which shows errors, number of compiled lines, warning
    etc.

6. If no error found in compilation than Run the program using Ctrl+F9 or click on Run inside Run
    Menu.

7. After successful you can see the result using Alt+F5 which shows the previous result on screen.

Let us see the picture of Program-

First Program in C Language
First Program in C Language
Picture after Compilation-

First Program Compiled Result in C Language
First Program Compiled Result in C Language
Picture after Run with Alt+F5 -

basic first c program run result
First Program Run Result in C Language

Basic Structure of C Program

Basic Structure of C Program


In this page we understand the basic structure of C Program. Because C Programming Language is Procedural/Structural Oriented and it follows top-down approach.

Basics

Basics of C Language


In each programming Language if you want to become expert, you must have the knowledge about the basics of that language. Hence we start learning basics of C Language in this page.

Basics of C Programming will be divided into three parts-Environment, Language and Class library.