Sie sind auf Seite 1von 7

Introduction to C

The C Language was developed by Dennis Ritchie at AT & T Bell Laboratories in 1972.
The Name C was given because many features were derived from B Language which
was developed in 1970 by Ken Thompson.
The B language was a stripped down version of Basic Combined Programing Language
(BCPL). The BCPL was developed by Martin Richards in 1967.
The BCPL was the upgraded version ALGOL. The ALGOL was developed by
International Group in 1960.

Development Cycle of Programing


Languages
Developed by International Group
ALGOL Year- 1960

Developed by Martin Richards


BCPL Year- 1967

Developed by Ken Thompson


B Year- 1970
Developed by Dennis Ritchie
Traditional Year- 1972
C
Developed by Kernighan and Ritchie
K & R C Year- 1978

Developed by ANSI Committee


ANSI C Year- 1989

Approved by ISO Committee


ANSI/ISO Year- 1990
C

C Tokens
Keywords
Identifiers
Constants

Keywords-
The keywords are previously reserve in C. The every word which has standard
predefined meanings called keywords. Keywords can be used as predefined purpose. In
cannot be used as the programmer definition.

In C Library 32 Keywords are defined with the particular of these words. These
keywords are shown in table below.
32 keywords of c language
Keywords
auto default short enum

register if signed void

static else unsigned return

extern int do goto

break float while const

continue char for sizeof

switch double struct typedef

case long union volatile

Identifiers-
Identifiers or symbols are the names. Which we give for variables, type, function,
and labels in our program.

We cannot use any keyword as identifiers because identifiers are


reserved for special use. We can create an identifier with these conditions.

These conditions of variable declaration or identifiers creation are.


Conditions to create identifiers or variables
Consist of only sequence of letters, digits, and the special character underscore (_).

We cannot use keywords as identifiers.

A letter or underscore must be the first character of an identifier.

C Language is a case sensitive language so Variable and variable are two different
identifiers.

Identifiers
Valid Variable Names Invalid Variable Names

Variable Variable.1

Variable1 variable!2

variable #variable

variable1 1variable

_variable +variable

a_long_variable variable 12
Constants-
Constants provide a way to define the variables which cannot be modified
during the execution of the program. The constants are basically divided in four types.

Integer Constants

Floating Constants

Character Constants

String Constants

Examples of Constants
Type of Constants Examples

Integer Constants 0, 1, 2, 3, 4, 5

Floating Constants 0.1, 1.2, 0.12, 12.3, 123.4

Character Constants a, b, c, d, e, +, @,#, 1,


%

String Constants a, Abhi, Sonu_Yaduvanshi


If you have any problem and any questions, so you
can ask me by e-mail. And you want to get solution of
any program, so you can send that on e- mail.

Name- Sonu Yaduvanshi (Abhishek)


Email- shrichandimaharanigroup@gmail.com
Sonu60040@gmail.com
Tweeter- @Abhishekyadav1

Das könnte Ihnen auch gefallen