+ 1

Please TELL ME THAT WHAT IS ++ SIGN FOR IN 5++ AND ++5 or. In 5-- and--5

Please tell me I am not understanding

7th Feb 2017, 1:54 PM
Mukul Kumar
Mukul Kumar - avatar
10 odpowiedzi
+ 5
++ means you add 1 to the value in front/behind of it, -- does the opposite. Example: int x = 5; x--; //x Will become 4 x++; //x will become 5 again
7th Feb 2017, 2:02 PM
Jeroen
Jeroen - avatar
+ 5
Okay, here is an example for your next question: int x = 5; x += 5; //x Will become 10. Why? x += 5 actually means x = x + 5 --> x = 5 + 5 = 10. It's some sort of 'shortcut'.
7th Feb 2017, 2:07 PM
Jeroen
Jeroen - avatar
+ 4
This is most asked question on this site. Just use 'search' function provided here
7th Feb 2017, 2:02 PM
Jakub Stasiak
Jakub Stasiak - avatar
+ 1
thanks a lot friends
7th Feb 2017, 2:08 PM
Mukul Kumar
Mukul Kumar - avatar
+ 1
I am new to this
7th Feb 2017, 2:13 PM
Mukul Kumar
Mukul Kumar - avatar
+ 1
5+=6++ means 5+=6 5=5+6 11
7th Feb 2017, 4:29 PM
Sahana S Shenoy
+ 1
nice doubt.... these questions are comes from increment and decrement... ++5 means first increase by 1 then answers is 6. --5 first decrease by 1 then answers is 4.
9th Feb 2017, 5:01 PM
vikas singh
vikas singh - avatar
0
please also tell me that wat is this for 5+=6++
7th Feb 2017, 2:04 PM
Mukul Kumar
Mukul Kumar - avatar
0
can any one please help me with this problem?i have studied all the concepts in c and c++, almost all the concepts but when a program,slightly difficult program is asked i dont know how to implement this concepts and where to implement it? please give me a solution.
7th Feb 2017, 5:47 PM
rishabh
rishabh - avatar
0
this is post and pre increment operation
8th Feb 2017, 5:23 AM
Vivian Mascarenhas
Vivian Mascarenhas - avatar