Explain increment and decrement operators, C/C++ Programming

Assignment Help:

Increment and Decrement Operators.  

The operator for increment is '++' and decrement is '-'. These operators enhances or decrease the value of a variable on which they are operated, by one(1).  They can be used as prefix or postfix to the variable, and their meaning altersdepending on their usage. When used as prefix, the value of the variable is incremented/ decremented before using the expression. But when used as postfix, its value is first used and then the value is incremented or decremented.

e.g.

                --x;

                x--;

 

In the above example it does not matter whether the decrement operator is prefixed or suffixed. It will produce the similar result.

 


Related Discussions:- Explain increment and decrement operators

Describe run-time type identification, The ability to verify at run time th...

The ability to verify at run time the type of an object by using the typed operator or the dynamic_cast operator.

Student, Ask4. Write a query to display the columns listed below. The query...

Ask4. Write a query to display the columns listed below. The query should list each customer in which the video rental is overdue. The Days_Overdue column should calculate the numb

The Polishing Game, Byteland county is very famous for luminous jewels. Lum...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Define the data type modifiers in c language, Define the Data Type Modifier...

Define the Data Type Modifiers in C language? There are three data types(int, float & double) above have the following modifiers. 1. short 2. long 3. signed 4. unsigned

I need voting bot, Project Description: Seeking a Voting Bot Script / Pr...

Project Description: Seeking a Voting Bot Script / Program Skills required are ASP, Javascript, C Programming, PHP, Software Architecture

Program to display asterisks in the shape of a plus sign, Write a program c...

Write a program called plus that will display asterisks in the shape of a plus sign which has the height and width specified by the user. You must only allow entry of an odd numb

Area under curve, Write a program to find the area under the curve y = f(x)...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

What is the use of pear in php, What is the use of PEAR in php? PEAR is...

What is the use of PEAR in php? PEAR is termed as PHP Extension and Application Repository. It provides structured library to PHP users and also gives provision for package mai

Star, how can i print any english work using star .?

how can i print any english work using star .?

How to insert values in array - c++ program, How to insert values in array ...

How to insert values in array - c++ program: Write a program to insert values in array void main() { int a[2][3][2]={                                 {

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd