Sie sind auf Seite 1von 2

What is C Language?

C is a general-purpose and low level standardized programming language developed in early 1970s by
KEN THOMPSON and DENNIS RICHIE at AT &T's Bell Laboratories for use on the Unix operating system . It has since spread to many other operating systems and is one of the most widely used programming language. It is also called as 'Procedure oriented programming language. C is not specially designed for specific applications areas like COBOL (Common Business -Oriented Language) or FORTRAN (Formula Translation). It is well suited for business and scietific applications.

features
It has some various features like control structures, looping statements, arrays, macros required for these applications. A simple core language with important functionality such as math functions or file handling provided by sets of library routines instead. The C language has following numerous features as: 1. 2. 3. 4. 5. Portability Flexibility Effectiveness and efficiency Reliability Interactivity

The following simple application appeared in the first edition of K and R and has become a standard introductory program in the most text books on C . The program prints out hello,world! to standard output (which is usually the screen ,but might be a file or some other hardware device or perhaps even the bit,bucket depending on how standard output is mapped at the time the program is executed .) Main() { printf (Hello,world!\n); }

Although the above program will correct under most compiler when invoked in non conforming mode,it now produces several warning messages when compiled with a compiler that conforms to the ANSI C standard C additionally the code will not specified otherwise. These message can be eliminated with a few minor modification to the ori ginal program. #include<stdio.h> Int main (void) { printf(Hello,world\n ); return0; }

Explanation
The first line of the program is an # include preprocessing directive which causes the compiler to substitude for that line the entire text of the file (or other entity) it refers to : in this case the standard header stdio.h will replace that line . The angle brackets indicates that the stdio.h header is to be found in whatever place is designated for the compiler to find standard header. The next (non-blank) line indicate that a function named main is being defined the main() function is special in c language programs as it is the function that is first run when the prpgram starts for hosted implementation of c and leaving aside housekeeping code. The curly brcakets delimit the extent of the function . The int defines main as a function that returns or evaluates to an integral no the void indicates that no argument s or data must be given to function main by its caller.

Das könnte Ihnen auch gefallen