Characteristics of C Programming

Characteristics of C Programming

There are 6 characteristics:

  1. Keywords

  2. Operators

  3. Separators

  4. Constant

  5. Predefined Functions

  6. Syntax

Keywords

  • Keywords are words that have special meaning to the C compiler.

  • An identifier can't have the same spelling and case as a C keyword. We can't use keywords for our own purposes.

  • There are a total of 32 keywords in C which are as follows:

autobreakcasechar
constcontinuedefaultdo
doubleelseenumextern
floatforgotoif
intlongregisterreturn
shortsignedsizeofstatic
structswitchtypedefunion
unsignedvoidvolatilewhile

Operators

  • Special types of symbols i.e. are used to perform specific task

  • Types: Binary operator, Unary operator, Ternary operator, etc.

  • Total 44 operators are present

Separators:

  • Separate things called as a token

  • we can separate individual unit -> token

What is Token
The smallest unit of c programming is known as a token. Token can be any keyword, operator, separator, constant, identifier, etc. We can give any number of spaces between tokens.

Constant

  • Variable that doesn't change its value throughout the program is known as a constant.

  • Types:

    • Alphanumeric constants -> a-z, A-z, 0-9

    • Numeric constants -> 0-9

Predefined FUnction

  • all predefined functions are stored in respective header files.

  • e.g.

    • stdio.h -> printf(), scanf(), ...

    • math.h -> sqrt(), ...

Syntax

  • Syntax is the rules which need to be followed while developing a program

  • e.g. To declare variable syntax is - data_type variable_name ;