Technology Programming

Basics of C programming Language

A programming language is designed to help in processing of certain data and to provide useful information to the user. There are lots of programming languages today that satisfy different needs of the user. For example: C, C++, Java, SQL, HTML, JavaScript etc. It helps to write a sequence of instructions that the computer can understand.

Actually, computer understands only machine level instructions i.e. 1 and 0. But it is really impossible to write a program using these binary digits. So, high level languages came into existence where the programmer can write the instructions using English like statements. And the Compiler takes the responsibility to convert a high level program into machine level instructions. 

C language came into existence in 1972 as a high level language. It was developed by Dennis Ritchie at Bell Laboratories. It is one of the most popular programming languages today. C can run under a number of operating systems including MS-DOS. It is well suited for structured programming.

It is a robust language with number of functions and operators to handle any complex program. Both system software and business packages can be developed using it. C is highly portable i.e. C program written for one computer can be run on another without modification.

Basic structure of C programs:

A C program may consist of one or more following sections:

1) Documentation section – It gives the name of the program, the author and any other details about the program.

2) Link section –
It provides instruction to the compiler to link functions from the system library.

3) Global declaration section – Global variables are declared in this section.

4) Main() function section – Every C program must have one main() function. The program execution begins at the opening brace and ends at the closing brace of main function section.

5) Subprogram section – It contains all the user-defined functions that are called in the main function.

Defining various components of C:

Keywords – they have fixed meanings and these meanings cannot be changed. Ex: auto, break, case, int, long

Identifiers – these are user defined names consists of a sequence of letters and digits. Name of variables, functions and array are its example.

Constants – It is the fixed value that does not change during the execution of a program. It can be integers, real numbers, characters, strings

Variable – it is a data name that is used to store a data value. It may take different values at different times during execution.

Data types – It represents which type of data being used in a program.

Operator – it is a symbol that tells the system to perform mathematical or logical calculations.

Expression – it is a combination of variables, constants and operators arranged as per syntax of language.

Printf() – it is a library function used for printing results.

Scanf() – it is also a library function that is used to read input data from the user.

stdio.h - standard input-output header file must be included at the beginning of a program.

Main() – It is a user-defined function which tells the computer where the program starts.

Function – It is a self-contained block of code that performs a particular task.
SHARE
RELATED POSTS on "Technology"
WordPress - How to Set up a New Theme to WordPress 3.
WordPress - How to Set up a New Theme to WordPress 3.
Solution of Creative Web Design
Solution of Creative Web Design
The three disciplines of User Experience
The three disciplines of User Experience
Web Design Sheffield Options For Professional Enterprises
Web Design Sheffield Options For Professional Enterprises
Do you have what it takes?
Do you have what it takes?
Segway Cost
Segway Cost
Microsoft Access 2010: What's Coming with Office 2010?
Microsoft Access 2010: What's Coming with Office 2010?
Companies of Web Development in Ireland Provide Designs that Work
Companies of Web Development in Ireland Provide Designs that Work
Penguin Update to Put Red-Flags on Negative SEO
Penguin Update to Put Red-Flags on Negative SEO
Innovative web 2 design templates can make your business famous quickly
Innovative web 2 design templates can make your business famous quickly
Building A Search Engine Friendly Website
Building A Search Engine Friendly Website
Exceptional Advice To Build Up Your Internet Marketing
Exceptional Advice To Build Up Your Internet Marketing
The Benefits of Selecting The Right Hosting Company
The Benefits of Selecting The Right Hosting Company
Is There a Methodology for Making Successful Logos
Is There a Methodology for Making Successful Logos
Benefits of Ruby On Rails Development
Benefits of Ruby On Rails Development
The Power of Colour and Shapes in Your Infant's Life.
The Power of Colour and Shapes in Your Infant's Life.
Advantages of Hiring PSD To HTML Service Providers
Advantages of Hiring PSD To HTML Service Providers
How to Make Responsive Web Design Attractive?
How to Make Responsive Web Design Attractive?
Converting PSD to Responsive HTML
Converting PSD to Responsive HTML
Just a few realy really hints and tips when it comes to website design but look for.
Just a few realy really hints and tips when it comes to website design but look for.

Leave Your Reply

*