Saturday, 31 January 2015

C programming basics

C programming basics


C programming is a popular computer programming language which is widely used for system and application software. Despite being fairly old programming language, C programming is widely used because of its efficiency and control. This tutorial is intended for beginners who does not have any prior knowledge or have very little knowledge of computer programming. All basic features of C programming language are included in detail with explanation and output to give you solid platform to understand C programming.

C programming basics

Computer programming means giving instruction to the computer and to interact with the computer we need a language to communicate with it, there are many languages such as C, C++, Java, Python each having their own features. Let's discuss first why we need programming suppose you are given ten numbers and asked to arrange them in ascending order then you can do it easily, but what if the numbers are say ten thousand it will be a difficult task and may take a long time and result may also contain errors, to simplify we can write a program which does this task and if the algorithm is correct then we will get result accurately and quickly, this is where programming is helpful.
All these program have been made using c graphics. Program for various type of charts and other interesting things and patterns.

C graphics codes

  • draw shapes
  • bar chart
  • pie chart
  • moving car
  • 3d bar chart
  • Smiling face animation
  • captcha
  • Circles in circles
  • Countdown

C program examples

Example 1 - C hello world program
 A very simple c program printing a string on screen
#include <stdio.h>
 
main()
{
    printf("Hello World\n");
    return 0;
}
Output of above program:
"Hello World"

No comments:

Post a Comment