C + + Experiment Two

Source: Internet
Author: User

1. A function declaration is the function that appears throughout the program, and the function definition determines the function.

2. A formal parameter is used in a defined function to accept the arguments passed when the function is called; arguments are constants, variables, or expressions in the main function, and they must all have a definite value to pass to the parameter. The return value refers to the result of feedback after the function has been executed, where a function can be called to determine the execution of the program or to obtain the desired result, depending on the return value.

3. The reference pass, the memory address is passed, the modification will change the memory address corresponding to the value, the value of the pass is simply passing the value of the object as a parameter, in a function can use this value, but cannot change it.

Sentiment: Through this experiment, deepened the proficiency of switch, while, does while, for, and so on, but also mastered the use of generating random numbers, while also consolidating some basic mathematical methods, such as the number of prime, factorial and so on. In addition, the understanding of function calls, the principle of the return value of formal parameter arguments is also deepened.

C + + Experiment Two

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.