# Let us Study C programming 1

C is a programming language developed by AT & T ‘s Bell Laboratories USA in the year 1972. It was designed and written by a Dennis Ritchie. In 70s C is replaced the languages like PL/I, ALGOL etc. After the C the popularity of the C language is widely spread across the world. The Ritchie seems to have been rather surprised that so many programmers preferred C to older languages like FORTAN or PL/I or the newer ones like pascal and APL.

Why the C Program became popular because

- It is reliable.
- It is Simple
- Easy to use.

**Let us Start Study Program with C**

Before we study any language study the alphabet first, So in case of program we must know what is alphabets, numbers and special symbols. The program is a group of instruction would be combined

### C character Set

The character set denotes any alphabet, digit or special symbols used to represent information. Following tables shows the valid alphabets, numbers and special symbols allowed in

Alphabets A,B,C——–Y,Z

a,b,c———-y,z

Digits 0,1,2,3,4,5,6,7,8,9

Special Symbols ~,”,@,#.!,%, etc

### What is Constants Variables and Keywords

The Alphabets, numbers and special symbols are properly combined form constants,variables and keywords.

**A constant is a quantity that does not change eg A, This quantity can be stored at a locations in the memory of the Computer.****A variable can be considered as a name given to the location in memory where constant is stored.Naturally the contents of the variable can change Eg 4A+Y =20****In this example 4 and 20 is not change they are called constants, where the quantities of A and Y can very or change hence they are called variables**

**Types of constants**

- Primary constant
- Secondary constant

**Rules for Constructing Integer Constants**

- An integer constant must have at least one digit
- It must not have a decimal point
- It could be either positive or negative
- If no sign precedes an integer Constant it is assumed to be positive.
- No commas or blanks are allowed within an integer constants.
- The allowable range for integer constants is between -32768 to 32767.

Ex 426,+782,-200

**Rules for Constructing Real Constants**

The real constants are often called as Floating point constants.The real constants could be written in two form fractional form or Exponential form.The following rules must be observed for real constants

- A real constants must have at least one digit.
- It must have a decimal point.
- It could be either positive or negative.
- Default sign is positive.
- No commas or blanks are allowed within an integer constants.

Ex +325.34,426.0

The exponential form representation of real constant usually used if the value of the constant is either too small or large. In exponential form of representation the real constant is represented in two parts, the parts appearing before e is called mantissa,where as the part following with e is called exponent.

The rules must be observed while construction of real constants expressed in exponential form.

- The mantissa part and the exponential part should be separated by a letter e.
- The mantissa part may have a positive or negative sign. Default sign of mantissa part is positive.
- The exponent must have at least one digit which must be apositive or negative integer. Default sign is positive.
- Range of real constants expressed in exponential form is-3.4c38 to 3.4c38.

Ex.: +3.2e-5

4.1e8

-0.20+3

3.2e-5

**Rules for Constructing Character Constants**

- A character constant is either a single alphabet, a single digitor a single special symbol enclosed within single invertedcommas Both the inverted commas should point to the left.

Ex ‘A’ is a valid character constant whereas A’ is not.

- The maximum length of a character constant can be 1 character

Ex A,6