Skip to main content

Command Palette

Search for a command to run...

Day 3: Learning Variables in C Programming

An Introduction to Variables in C Programming

Updated
1 min read
  1. variable is a name of memory location where we store program data during execution of program

  2. variable name is any combination of alphabet (a to z or A to Z ) digits (0 to 9) and understanding (-)

  3. No other symbol is allowed

  4. volid variable name cannot start from a digits

  5. variable name cannot be a keyword

    C language is a case sensitive language keyword in c

    1. auto 7. double 14.Register

    2. break 8. else 15.return

    3. case 9.Enum 16.short

    4. Int 10.execution 17.signed

    5. char 11.float 18.struct

    6. Const 12.for 19.switch

    7. continue 13.long 20.union

Data Types & Variable Declarations

Data classification:- Different data required different way of handling data in computer

Factor responsable for data classification

  1. Memory size required to share data ]

  2. method to convert data into binary for internal representation

  3. kind of operation performed on data

    Data Types

    • Char (1 bytes)

    • int (4 bytes)

    • float (4 bytes)

    • double (8 bytes)