I ++ and ++ I

Source: Internet
Author: User

I ++ and ++ I

Many people on the internet asked me how I ++ and I understood it. The answers provided by netizens are almost the same. As follows:

I ++: perform computation first, and then I auto-increment 1

++ I: I auto-increment 1, and then calculate

In addition, the explanations provided in the textbook are similar to those described in this document, but it is both troublesome and easy to forget. Is there a simple understanding technique? The answer is yes, of course!

It can be understood as follows: if the Code contains such a calculation, the calculation is performed with the expression (for example, I ++ or ++ I) and has nothing to do with the I value, then:

I ++ can be understood as assigning the value of I to the expression first, and then increasing I by 1

++ I can be understood as the value of I first increases by 1, and then the value of I is assigned to the expression.

In this way, we can clearly see the detailed changes of I ++ and I in the entire computing process, facilitating understanding and memorizing. I -- is similar to -- I, I will not explain it.


In probability theory, what is I [a, B] (x?

It seems that you use the mark I in the book to remember the feature functions of the set.
I [a, B] (x) means that when a ≤ x ≤ B, I [a, B] (x) = 1. In other cases, I [, b] (x) = 0
Not all books use this mark.

What is the difference between I in English and l in lowercase "the letter before mn?

It expresses the Personal Pronoun "I" and is used as the subject. In this case, I should be capitalized wherever I is put, for example, I'm a student. He and I are old friends. Lowercase I is a simple letter. it must be combined with other letters into words, such as it, in, and.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.