What is += shorthand for in C/C++?
-
Its in one of my programs for intro to programming with C and im not sure what it means.
-
Answer:
It's a short version of a regular assignment. It's like when you do for example: n + 1 = n It can also be written as: n+=1 All you have to do is put your variable to the left and what you what to increase it by to the right. You can also do /= for division, -= for subtraction, and *= for multiplication. I'll put the link in the source section so you can look at it more in detail.
J6YAKNAD7QEREG4LGQNL452UDA at Yahoo! Answers Visit the source
Other answers
It is the shorthand for the add operator. ex b = 1; c = 0; c = c + b; is the same as b = 1 c = 0; c += b; //adds b to c It's actually in all coding languages.
Io amo la musica!
Related Q & A:
- What is the difference between C# and C#.NET?Best solution by Stack Overflow
- What is happening to my P.C, when it keeps closing out my pages while im in the internet?Best solution by Yahoo! Answers
- What certification can I get for C Programming?Best solution by Yahoo! Answers
- What are the functions of vitamin C?Best solution by nytimes.com
- What does the R.F.C.F mean on the back of spain's jersey?Best solution by ChaCha
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.