Page 60 - DCAP404 _Object Oriented Programming
P. 60

Unit 2: Beginning of OOP Language




             point unit). The floating point unit is a specially designed chip which can calculate the  Notes
             floating point values (number with decimal values) much faster than usual. A FPU can
             handle all graphical applications much faster than any other chip.
             The latest computers provide scope for further and higher upgradation. If a motherboard
             has a provision for ZIF socket, the upgradation is much easier. Zero Insertion Force (ZIF)
             is a ready-made socket that allows one to insert and remove any chip set without additional
             tools to support.

             The co-processor is a supporting chip fitted in with the CPU to assist in specific types of
             operations. This will reduce the burden on the CPU when very complex mathematical and
             scientific calculations have to be done. For instance, the Math Co-processor (MC)  will
             assist the CPU in faster processing of applications that have floating point values. The
             computer should have a co-processor supporting program that calls the MC to make C
             recognise floating point calculations. Otherwise the co-processor will not recognise the
             instructions.
             To boost the speed of the system, all the co-processors can be fitted to the motherboard.

          2.7 Summary

              C++ language is made up of letters, words, sentences  and constructs  just like  English
               language.
              A collection of characters, much like a word in English language are called tokens.
              A token can be a keyword, or identifier, constant, string or an operator.

              Keywords are the reserve words that cannot be used as names of variable or other user-
               defined program elements.
              Identifiers refer to the names of variables, functions, arrays, classes etc. created by the
               programmer, Basic types.
              An array represents named list of finite number of similar data elements. A function is a
               named part of a program that can be invoked from the other parts of the program.

              A pointer is a variable that holds a memory address of another variable. A reference is an
               alternative name for  an object. A constant is a  data item whose data value can  never
               change during the program run.
              Operators are the symbols that represent specific operations. Arithmetic operators are
               unary +, Unary–, +, –, *, / and % . ‘%’ uses pure integer division thereby requires integer
               operands.
              Comparison operators, also called relational operators, compare the relationships among
               values. The order of evaluation among logical operators is NOT, AND, OR, i.e.!, &&, 11.
              Along with mallo(), calloc() and frec() functions, C++ also defines two unary operators,
               new and delete, that perform the task of allocating and freeing the memory.

          2.8 Keywords


          Character Constant: One or more characters enclosed in single quotes.
          Expression: A combination of variables, constants and operators written according to  some
          rules.

          Identifies: The names of variables, functions, arrays, classes, etc. created by the programmer.



                                           LOVELY PROFESSIONAL UNIVERSITY                                   53
   55   56   57   58   59   60   61   62   63   64   65