C/C++  References

Objectives :

  • myArrayNested3.cpp
    sending two dimensional array as a parameter to a function.
 

Elements of C / C++ Lexical Conventation

  • Tokens:
    • Tokens are separated by blank space , new lines, tabs etc.
    • C++ parsers processes the token like identifiers, keyword/reserved word, comment and escape characters etc
  • Comments:
    • range comment :  the character like /* ---*/
    • single line comment : //
  • Identifiers
    • keyword / reserved word blank-space identifier
      • class myClass
      • enum Emp
      • int variable
  • Keywords
    • These are reserved identifiers and can't be used in your code.
      • abstract, _abstract, bool, char ,class. const, case etc.
  • Constants
  • String
  • Punctuation and Special characters
    • punctuation like !, \, ^,
  • Operators
    • + is addition
    • * is multiplication
    • *x1 a pointer
    • = assignment and so on.
       

Step: 2 Basic Concept

  • Declaration :
    • int i
  • Define or initiation
    • i = 20 ;
  • Declaration and initiation : int n1 = 20;
  • Declaring enumeration
    • enum(Jan = 1, Feb=2 and so on);
  • Declaration Global
    • double d1 = 12.25; will be global within a namespace
      • int main() { cout<< d1 ; return 0;}
      • void foo() { cout<< d1 ; }

 

Step: 3 Runtime Views:

 

Step: