Responsive Ads Here
Showing posts with label c programming basics. Show all posts
Showing posts with label c programming basics. Show all posts

Sunday, July 31, 2016

How to Learn C Programming Language - Lesson #2

Hey guys, you know what programming is the heart of technology and technology is the most important thing in this modern era. Just think the importance of learning programming! Anybody can learn to code C and can participate in the competetion of invention new things. So, I decided to write a serial writting about coding.

C Programming Language

There are many languages to write a program. Here we'll start in C/C++ language. C and C++ are about to same. For that, we'll start in C and finish in C++ at last. As we'll write a program in C language, we've to use a C language compiler. It can be Code Blocks, Quincy or Turbo C++. Here we'll use Code Blocks. To download and install Code-Blocks click here,
To install the Code-Blocks softwere click here,

>>>How to Intall Code-Blocks.

How to Learn to Code C

We'll write the program first and then will try to understand it. Let's start our first program...

/*  Coding start  */

#include<stdio.h>
int main()
{
      printf("Hello World!");
      return 0;
}

/*  Coding end  */

This is our first program. Just now you've written it. So you're a programmar! :-D . Yeah, you've turned yourself as a part of programming world.

Let's have a look on the output of our first program. Here is this!
To understand well, revise the lesson one here,


Ok, now we'll try to understand the program. There are some divisions in a C language program. And it is definite for all C language used the programs.

  • First we need to type "#include" to start a program in C. What we are writting in the compiler, what are these? Actually, these are instructions. We input these instructions and compiler will make the result of these. "stdio.h" means standard input output.
  • Then we wrote the main function. "int" means integer.
  • Then we need to declare the variables. As it is a simple program and there is no veriable in this program, we'll try to understand it in the next programs.
  • What we want to show in the screen, we'll write these in the printf("") qouatation. Run the program and you'll see "Hello World!" in the screen.
  • Every statements are closed by placing ";" at the end.
  • After all the statements and conditions we've to write "return 0;" to close the program.
  • All the variables, statements and conditions will be in "{}".

                  How To Learn C Programming Language - Lesson #1

                  Hey guys, I’m going to start a tutorial addressing as “How to Learn C Programming Language”. It will be a serial tutorial. Methods of C language coding will be present here with different types of problems or examples. I think you’ll get benefits from these lessons. C is a powerfull programming language among all. So, It contains high impotance in the programming world. C and C++ is quite same. Actually C++ is the latest version of C language. If you've interest on it you should learn to code C language. It will help to learn C++ in future easily. Let’s start…

                  learn to code c

                  How to Learn C Programming Language

                  1. As computer don’t understand our local or international language, we’ve to use a compiler to make computer understood. Different compilers like Quincy, Code-Blocks, turbo C++ and etc are used to write C codes. We’ll use Code-Blocks to write C programming language. To download this softwere, click here.
                                  >>>Download Code-Blocks.
                  1. After completetion the downloading process of Code-Blocks, Run the Softwere. To know more about the running methods of this softwere, read this article.
                                                   >>>How to Install Code-Blocks on Windows PC.
                  1. Then open the softwere from the desktop or start menu.

                  1. After opening the softwere take a new document from File >>> New >>>Empty file or press on Ctrl+Shift+N.
                  1. In the new empty document, here we’ll have to type the codes.
                  1. After writing the codes click on “Build” option from the menu bar. And then “Build and Run” to run the program.

                    1. If the codes are correct and build these correctly a new window will appear like this. Result will be shown here of this program.
                    This is the entire process of being ready for coding. If you complete the lesson, you can start coding now. To write your first program move on the next article.