Course Content
History of C Language
0/2
Basic Structure of C Program
0/1
Types of Errors
0/1
Language Fundamentals
0/1
Data Types and Modifiers
0/1
Programming with C Language
About Lesson

Character Set: The Character set of C Language has alphabets, numbers and special symbols as shown below:

  1. Alphabets including lower and upper case letters
  2. Numbers 0-9
  3. Special Characters like ; , : { / \ ^ # @

Keywords are reserved words which have standard, predefined meaning.  They can also be called as program-defined Identifier.  They should be use in lower case.  They are 32 in number.

List of C keywords:

                        char                  while                do                    typedef             auto

                        int                    if                      else                  switch              case

                        printf                double              struct               break                static

                        long                 enum               register             extern               return

                        union               const                float                 short                unsigned

                        continue           for                    signed              void                  default

                        goto                 sizeof               volatile

Data type is the format of data elements that are stored in the program.  A datatype determines:

  1. Type of data
  2. permissible range of values that it can store
  3. Memory requirement

Four Basic data types in C Language: int, char, float and Double

Program Element is a basic building block that is used to construct program.  Program Elements are two types:

  1. Data element Eg: variable, array
  2. Code element Eg: function

Identifier is the name given to various program elements such as constants, variables, functions and arrays etc.

Rules for naming an Identifier:

  1. It consists of letters and numbers
  2. First character must be an alphabet or underscore
  3. Both upper and lower case are allowed. Eg: TEXT is different from text
  4. No special symbols are allowed

Examples of Valid Identifiers: X, X123, _XI, temp, tax_rate

Examples of Invalid Identifiers: 123, “X”, Order-no, error flag

 

You cannot copy content of this page