12

Introduction to c

Embed Size (px)

Citation preview

Page 1: Introduction to  c
Page 2: Introduction to  c

C language is very easy and a powerful computer programming language bbecause it is very small and structured.

C language is a Middle level language i.e. suitable for systems programming.

It is a case sensitive language.

It is highly portable language.

C is a procedural or sequential language.

It is easy to learn and understand.

It is a small language

Page 3: Introduction to  c

C language was invented by DENNIS RITCHIE at Bell Laboratories in between 1969 1nd 1973.

C language was standardized by ANSI in 1989 and known as ANSI C.

Page 4: Introduction to  c
Page 5: Introduction to  c

Portability- C is a machine independent and highly portable language.

Robustness- C has a set of built in functions and operators.

Easy to understand and learn as it has only 32 keywords.

Fast and Efficient

Flexible- It is not only for system but also for embedded system commercial data processing.

Integration with UNIX.

C has a large library of functions.

Page 6: Introduction to  c

Complexity- Difficulty in solving complex problems.

Difficult to debug.

Difficult to modify.

Error-prone

Diffficult to write large programs.

Page 7: Introduction to  c

Character set

Data Types

Constants

Keywords

Variables

Grammer(Syntax & semantics

Page 8: Introduction to  c

Documentation Section (optional) Link Section (optional) Defining Section (optional) Global Declaration Section (optional) Main Function Section ( )

{Declaration partExecutable part

} Subprogram Section (optional) Function 1 Function 2 Function n

Page 9: Introduction to  c

/* This is a sample C program. */

#include <stdio.h>

#include <conio.h>

main ( )

{

clrscr ( );

printf (“Hello \n”);

getch ( );

}

Page 10: Introduction to  c

C program is executed in 3 phases:

Create a source code file.

[Empty file(input) – Source Code file(output)]

Compilation

[Source code file(input) – object file(output)]

Linking

[Object File(input) – Executable File (output)]

Page 11: Introduction to  c
Page 12: Introduction to  c