C Language

C Language



Introduction

Definition -

What does C (C) Programming Language Mean?

C is a high-level and multi-purpose programming language that is very suitable for developing portable firmware or applications. Originally intended to write system software, Dennis Ritchie C was developed by Bell Labs for Unix operating systems in the early 1970s. Among the most frequently used languages, C is a compiler of most computer systems and has influenced many popular languages   - especially C ++.

MANteck C Programming Language (C) Explains :

C deals with structured, procedural paradigms of languages. It is proven, flexible and powerful and can be used for various applications. Although high-level, C and assembly languages   share many of the same characteristics.

Some important features of C include:
  • Fixed number of keywords, including a set of control primitives, such as, if, while, switch and do.
  • while Several logical and mathematical operators including bit manipulators
  • Several functions can be implemented in a statement.
  • Function return values   are not always required and can be ignored if ignored.
  • Typing is constant. All data have types, but they can reportedly be transformed.
  • The basic form of modularity, as files can be separately compiled and linked.
  • Control of function and object visibility to other files via external and static attributes.

C character sets :

  1. Alphabets:- A,B,C,……,Y,Z a, b , c,…..,y, z

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

  3. Special symbol:- ~!@#$%^&*()_ -+ ={} >, .? / |\ [] : ; “ ‘ <


Keyword :

  • Keywords are words whose meanings have already been mentioned in compiler C.

  • Keyword cannot be used as variables.

  • There are only 32 keywords in C.
Types of Operator :

  • Arithmetic operator

  • Relational operator

  • Logical operator

  • Assignment operator

  • Increment and decrement operator

  • Conditional operator

  • Bitwise operator

Arithmetic Operator :

Operator               Meaning

  +                          addition

  -                          subtraction

  *                          Multiplication

  /                          Division

  %                         Modulo division


Relational Operator :

Operator               Meaning

  <                          less than

  >                          greater than

  <=                        less than or equal to

  >=                        greater than or equal to

  ==                        equal to

  !=                        not equal to


Logical Operator :

Operator                   Meaning

  &&                        logical AND

   ||                        logical OR

   !                          logical NOT


Bitwise Operator :

Operator               Meaning

  &                              bitwise AND

  |                                 bitwise OR

  ^                               bitwise EXOR

  <<                            shift left

  >>  `                         shift right

  ~                               bitwise complement


Increment/Decrement Operator :

Operator               Meaning

  ++                        increment

  --                         decrement


Data Types :


Data type

Range

Bytes

Format

Signed char

-128 to +127

1

%c

Unsigned char

0 to 255

1

%c

Short signed int

-32768 to +32767

2

%d

Short unsigned int

0 to 65535

2

%u

Signed int

-32768 to +32767

2

%d

Unsigned int

0 to 65535

2

%u

Long signed int

-2147483648 to +2147483647

4

%ld

Long unsigned int

0 to 4294967295

4

%lu

Float

-3.4e38 to +3.4e38

4

%f

Double

-1.7e308 to +1.7e308

8

%lf

Long double

-1.7e4932 to +1.7e4932

10

%




Summary of C Types :

  • Constructed from primitive types that correspond to processor types
  • char, int, float, double, pointers
  • Structure and union aggregate heterogeneous objects
  • The matrices build sequences of identical objects
  • Alignment limitations ensured by the compiler
  • Multidimensional matrices
  • Three storage classes -
  1. global, static (address set at the time of compilation)
  2. automatic (stacked)
  3. heap (provided by calls in the malloc () and free () library)
If you want this article in power point presentation then Click Here