HackMyTution.COM

C Language

BY Impulse Technology

What is C Constant

C constant are also like variables, but only difference is there value cannot be modified by the program once they are defined. They are also called as lateral constant maybe belonging to any of the data type.

Type of C constant
  • Integer Constant→ 1,2,3,4,5,6,7,8,...
  • Real or Floating point Constant→ 2.5,2x2.5,ect...
  • Octal & Hexadecimal Constant→ (13)s,(FACE)13
  • Character Constant→ 'A', '9', 'BCD' Note:Character constant contains only one character.
Impulse Technology


Variables of C Programming

Variables in C language is also called as containers to stored data. Each variables in C language has a specific type which datermined the size of layout of the variable memory, the range of values that can be stored with in that memory and the set of operation that can be applied to the variables

Rules for writing variable name→
  • Compiler allows character→ A to Z, a to z, -
  • Digits allowed by compiler→ 0 to 9
  • First character of variable should be alphabate and underscore (_)
  • Variable name should be combinations of 1 to 31 aphlabets, digit and underscore(_). Some compilers allows variable names upto 247 characters.
  • No special symbols allowed other than underscore (_)
  • No blank space and commas allowed
Impulse Technology


Data-Types

Data-type is a type of data which specify data storage format that can contain time, address size, name range and value. When computer program stored data in variable, each variable must be defined by a specific type.

Types of Data-Types→
  • Basic / Fundamental / Primitive
  • Derived Data-Types
Impulse Technology