Fundamentals of C Programming / C Language



C has three types of variables

  1. Integer Variables
  1. Floating-point Variables
  1. Character Variables

Integer Variables:

  • Integer is a whole number.
  • It may have a positive or negative value.
  • (e.g.) 25, 785, -78, 342
  • Four types of integer are
  1. Int (Takes 2 bytes in memory)
  2. Short Int (Takes 2 bytes in memory 
  3. Long Int (Takes 4 bytes in memory
  4. Unsigned Int (Takes 2 bytes in memory, Can Store only positive values)

Floating-point Variables:

  • These consist of whole numbers with fraction or decimal point.
  • These are also called floating point numbers.
  • (e.g.) 27.47, 0.14, -2.15
  • Three types are

Float

  •    It takes 4 bytes in memory.
  • Represented in decimal or exponential form.
  • May be signed or unsigned

Double

  •  It takes 8 bytes in memory.
  • Used to store large floating values.

About Saweel Ur Raheem

Check Also

MCSE Notes Lecture # 4 : Applying Security to Folders

LECTURE 4 APPLYING SECURITY ON FOLDERS: Open Folder Options. Go to View Tag and uncheck ...

© Copyrights 2014. All rights are reserved www.latestcontents.com