c programming language mr. anuchart supjalarn 48540892

10
C Programming Language Mr. Anuchart Supjalarn 48540892

Upload: eustace-ross

Post on 14-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: C Programming Language Mr. Anuchart Supjalarn 48540892

C Programming Language

Mr. Anuchart Supjalarn48540892

Page 2: C Programming Language Mr. Anuchart Supjalarn 48540892

When was the language first designed or implemented?

The C programming language was devised in the early 1970s as a system implementation language for the nascent Unix operating system

Page 3: C Programming Language Mr. Anuchart Supjalarn 48540892

What were the goals and purpose of this language?

The purpose of creating C language that was capable of both high level, machine independent programming and would still allow the programmer to control the behavior of individual bits of information.

Page 4: C Programming Language Mr. Anuchart Supjalarn 48540892

Who designed the language (maybe one person, a group, an organization)?

Dennis Ritchie(at Bell Laboratories)

Page 5: C Programming Language Mr. Anuchart Supjalarn 48540892

What are some main features or distinctive features of the language?

C is a powerful, flexible language that provides fast program execution and imposes few constraints on the programmer.

It allows low level access to information and commands while still retaining the portability and syntax of a high level language.

These qualities make it a useful language for both systems programming and general purpose programs.

Page 6: C Programming Language Mr. Anuchart Supjalarn 48540892

How successful was the language?

C has become successful to an extent far surpassing any early expectations. What qualities contributed to its widespread use?

Doubtless the success of Unix itself was the most important factor; it made the language available to hundreds of thousands of people. Conversely, of course, Unix's use of C and its consequent portability to a wide variety of machines was important in the system's success.

But the language's invasion of other environments suggests more fundamental merits.

Page 7: C Programming Language Mr. Anuchart Supjalarn 48540892

How widely is the language used today?

The C programming language is used in many different areas of application, but the most prolific area is UNIX operating system applications.

The C language is also used in computer games

Page 8: C Programming Language Mr. Anuchart Supjalarn 48540892

Example ( Sine Function by Michel Vallieres )

#include < stdio.h> #include < math.h>

void main() { int angle_degree; double angle_radian, pi, value;

/* Print a header */ printf ("\nCompute a table of the sine function\n\n");

/* obtain pi once for all */ /* or just use pi = M_PI,

where M_PI is defined in math.h

*/ pi = 4.0* atan(1.0); printf ( " Value of PI = %f \n\n", pi );

Page 9: C Programming Language Mr. Anuchart Supjalarn 48540892

printf ( " angle Sine \n " );

angle_degree=0; */ initial angle value */

* scan over angle */

while ( angle_degree < = 360 ) * loop until angle_degree > 360 */ { angle_radian = pi * angle_degree/180.0 ; value = sin(angle_radian); printf ( " %3d %f \n ", angle_degree, value );

angle_degree = angle_degree + 10; * increment the loop index */

} }

Page 10: C Programming Language Mr. Anuchart Supjalarn 48540892

References http://www.engin.umd.umich.edu/CIS/course.des/cis400/

c/c.html

http://cm.bell-labs.com/cm/cs/who/dmr/chist.html http://www.physics.drexel.edu/courses/CompPhys/

General/C_basics/c_tutorial.html