Introduction to c

Preview:

Citation preview

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

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.

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.

Complexity- Difficulty in solving complex problems.

Difficult to debug.

Difficult to modify.

Error-prone

Diffficult to write large programs.

Character set

Data Types

Constants

Keywords

Variables

Grammer(Syntax & semantics

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

/* This is a sample C program. */

#include <stdio.h>

#include <conio.h>

main ( )

{

clrscr ( );

printf (“Hello \n”);

getch ( );

}

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)]

Recommended