Explain Decrement operator

Decrement operator: It is an operator (--) which adds one to its operand. This has two forms: pre-decrement (--x) and post-decrement (x--). In its pre-decrement form, the outcome of the expression is the value of its argument subsequent to the decrement. In its post-decrement form, the outcome is the value of its argument previous to the decrement is executed. Subsequent to the following,

   int a = 5, b = 5;
    int y,z;
    y = --a;
    z = b--

y has the value of 4 and z has the value of 5. Both a and b encompass the value 4.

   Related Questions in Programming Languages

  • Q : Basic Units of CSS Specify the Basic

    Specify the Basic Units of the CSS.

  • Q : Main uses of Virtual memory Illustrate

    Illustrate the main uses of Virtual memory?

  • Q : Attatching CSS to HTML documents

    Explain the different ways in order to attach the CSS to HTML Documents?

  • Q : Syntax to create AJAX objects Write the

    Write the syntax to create the AJAX objects?

  • Q : Explain the role XSL that dynamically

    Explain the role which XSL can play while dynamically generating HTML pages by a relational database?

  • Q : What is Shallow copy Shallow copy : It

    Shallow copy: It is a copy of an object in which copies of each and every object's sub-components are not as well made. For example, a shallow copy of an array of objects would outcome in two separate array objects, each having references to similar s

  • Q : Explain Imperative programming

    Imperative programming: The style of programming generally related with languages such as FORTRAN, C, Pascal and so forth. Imperative programming is differentiated from functional programming in that the previous is strongly tied to the idea of variab

  • Q : Define the term Graphical User Interface

    Graphical User Interface: A Graphical User Interface (abbreviated as GUI) is a part of a program which permits user interaction through graphical components, like menus, buttons, text areas, and so forth. Interaction frequently includes the usage of a

  • Q : Benefits of the event-delegation model

    Write down some of the benefits of the event-delegation model over event-inheritance model?

  • Q : What is Pattern Pattern : It is a

    Pattern: It is a recurring theme in class usage or design. Interfaces like Iterator encapsulate a pattern of admission to the items in a collection, whereas freeing the client from the requirement to know details of the way in which the collection is

©TutorsGlobe All rights reserved 2022-2023.