Featured Post

80186 Microprocessors: Introduction and Architecture

Hello friends, today we are going to discuss the 80186 microprocessor with integrated peripherals. The Intel 80186 is an improved version of the 8086 microprocessor. 80186 is a 16-bit microprocessor with a 16-bit data bus and a 20-bit address bus. It has a programmable peripheral device integrated into the same package. The instruction set of the 80186 is a superset of the instruction set of the 8086. The term super-set means that all of the 8086 instructions will execute properly on an 80186, but the 80186 has a few additional instructions. The following figure shows the block diagram and pin diagram of 80186. The CPU is divided into seven independent functional parts. 80186 internal block diagram  80186 68-pins pin diagram  Functional parts of 80186 Microprocessor The Bus Interface Unit (BIU) Execution Unit (EU) Clock Generator Programmable interrupt controller Programmable Chip Select Unit (CSU) Programmable DMA Unit Programmable counter/timers The Bus Interface Unit

'C' Constants, Variables and Keywords

Hello friends, today we are going to see what is 'C' constants, variables and keywords? how to use that and why to use? 
'C' Constants, Variables and Keywords
'C' Constants, variables and keywords

Definition

When the alphabets, numbers and special symbols properly combined form constants, variables and keywords. The detail definition is as follows.

Constants: 

A constant is a quantity that doesn’t change. This quantity can be stored at fix memory location and whenever needed computer can show the same value. Examples: 5, 7, 12.6, 1050 etc.
Constants can be divided into two major categories and some sub categories, these are as follows:

Primary Constants and Secondary Constants.
Secondary Constants
Integer Constants
Array
Real Constants
Pointer
Character Constants
Structure

Union

Enumerated


Primary Constants:

Integer Constants:

Rules

  • An integer constant must have at least one digit.
  • It doesn’t have a decimal point.
  • It could be either positive or negative, default sign is positive.
  • No commas or blanks are allowed within an integer.
  • The range of integer constants is -32768 to +32767
Example: 426, +782, -7654 etc.

Real Constants:

Real constants are also called Floating point constants. This constants could be written in two forms. Fractional form and Exponential form.
Rules

  • A real constant 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 a real constants
  • In exponential form, the mantissa part (the part appearing before ‘e’ is called mantissa) and the exponential part (the part following ‘e’) should be separated by a letter e.
  • The range of real constants is -3.4e38 to 3.4e38
  • Example: +325.34, 426.0, -32.76, 6.8e-5, -0.4e8, -4.9e-3 etc.

Character Constants:

The Character constants can be used to store a single character such as a single alphabet or letter ’a’ the single digit ’6’ or a single special symbol enclosed within single inverted commas.
Rules

  • Both the inverted commas should point to the left.
  • The maximum length of a character constant can be 1 character.
  • Example: ’A ’, ’$’, ’5 ’, ’=’ etc.

Variables

A variable is a location where the constant is stored. The contents of the variable can be changed.
 Example: 3X+Y=20   
Here X and Y are the variables and 20 and 3 are the constants.
Rules

  • A variable name is any combination of 1 to 8 alphabets, digits or underscores.
  • The first character must be an alphabet.
  • No commas or blanks are allowed within a variable name.
  • Only underscore are valid as a special symbol.

Example: si_int, m_hra, pop_e_89 etc.

Keywords

Keywords are the words whose meaning has already been explained to the computer. The keywords cannot be used as variable names. The keywords are also called as ‘Reserved words’. Example: break, for, int, float, void etc.
Well, did you like this post, please give me your valuable reviews as comment. It will help me to improve my self. 

Comments

  1. Anonymous11/16/2011

    this is nice blog with brief information

    ReplyDelete

Post a Comment

Your comment will inspire me, Please leave your comment