Every C program must have one special function main().This is the point where execution beings when the program is running. We will see later that this does not have to be the first statement in the program,but must exit in the entry point.

The group of statement defining the main()enclosed in a pair of brases ({})are exccuted sequentially. Each expression statement must end with a semicolon.The closing brace of the main function signals the end of the program. The main function can be located anywhere in the program but the general practice is to palce it as the first function.

int main()
{
printf("hello world");
return 0;
}

This program is also executable,so you'll be able to compile and run it see if it does what you think it should. With some compile and run it should. With some compilng ,indicating that the function printf()should have a prototype.

#include
#include
int main()
{
printf("hello world");
return 0;
}

Here is a minimal C program that displays the string welcome to languages.When you execute a below program you won't see "hello world"on the console because the screen will just flash and go away.If you want to see the line you can use getch()function just below the printf()statement actually it waits untill a key passed.

#include
#include
int main()
{
clrscr()
printf("hello world");
return 0;
}

Features of C :

It is a very simple and easy language, C language is mainly used for develop desktop based application. All other programming languages were derived directly or indirectly from C programming concepts. This language have following features :-

  1. Simple
  2. Portability
  3. Powerful
  4. Platform dependent
  5. Structure oriented
  6. Case sensitive
  7. Compiler based
  8. Modularity
  9. Middle level language
  10. Syntax based language
  11. Use of Pointers

1. Simple

Every c program can be written in simple English language so that it is very easy to understand and developed by programmer.


2. Portability

It is the concept of carrying the instruction from one system to another system. In C Language.C file contain source code, we can edit also this code. .exe file contain application, only we can execute this file. When we write and compile any C program on window operating system that program easily run on other window based system.


3. Powerful

C is a very powerful programming language, it have a wide verity of data types, functions, control statements, decision making statements, etc.


4. Platform dependent

A language is said to be platform dependent whenever the program is execute in the same operating system where that was developed and compiled but not run and execute on other operating system. C is platform dependent programming language


5. Structure oriented

C is a Structure oriented programming language.Structure oriented programming language aimed on clarity of program, reduce the complexity of code, using this approach code is divided into sub-program/subroutines. These programming have rich control structure.


6. Case sensitive

It is a case sensitive programming language. In C programming 'break and BREAK' both are different. If any language treats lower case latter separately and upper case latter separately than they can be called as case sensitive programming language [Example c, c++, java, .net are sensitive programming languages.] other wise it is called as case insensitive programming language [Example HTML, SQL is case insensitive programming languages].


7. Compiler based

C is a compiler based programming language that means without compilation no C program can be executed. First we need compiler to compile our program and then execute.


8. Modularity

It is concept of designing an application in subprogram that is procedure oriented approach. In c programming we can break our code in subprogram. 9.Middle level language C programming language can supports two level programming instructions with the combination of low level and high level language that's why it is called middle level programming language.


10. Syntax based language

C is a strongly tight syntax based programming language. If any language follow rules and regulation very strictly known as strongly tight syntax based language. Example C, C++, Java, .net etc. If any language not follow rules and regulation very strictly known as loosely tight syntax based language.


11. Efficient use of pointers

Pointers is a variable which hold the address of another variable, pointer directly direct access to memory address of any variable due to this performance of application is improve. In C language also concept of pointer are available.

News Walls


Copyrights © 2016. All Rights Reserved to Learn Computers Home, India. //Site Designed.