CPP

Lecture 2 : Identifiers

1. Contants

Types of Constants

  1. Primary
    • Integer (5,100,-64,79,106)
    • Real (5.0, 1.06)
    • Character (‘A’, ‘5’, ‘+’)
  2. Secondary
    • Array
    • String (“Priyanshu”)
    • Pointer
    • Union
    • Structure
    • Enumerator
    • Class

2. Variables

3. Keywords

auto double int struct asm private
break else long switch catch public
case enum register typedef class protected
char extern return union delete template
const float short unsigned friend this
continue for signed void inline throw
default goto sizeof volatile new try
do if static while operator virtual

4. Data types

Unlike C, we can declare variables even after action statements in C++

Example :


int main()
{
    clrscr();
    int x=4;
}