C Language Blog Job--function nested call

Source: Internet
Author: User

First, the laboratory work 1.1 PTA Topic

6-1 recursive implementation of exponential functions

1. Design Ideas
    • Double Calc_pow (double x, int n)
    • if n equals 1
      then return x;
      Otherwise
      n--;
      Return to X*calc_pow (X,n);
2. Code

3.# #调试问题

    • There is no debugging problem
1.2 Student performance Management System second, this week's topic set PTA Final Ranking

Third, read the code
    • The topic is to design a code to understand the recursive function
    • The advantage is that it makes me more aware of the use of recursive functions such as calculating the fun (3) process above: encountering fun at Execution (2), saving the current n (n=3) and Fun (2) return address after execution;
      Then continue execution, continue to the local variables and function return address into the stack save. The stack is started until a recursive end condition is encountered.
Iv. Study Summary of the Week 1. Learning content
    • 1. About recursive functions: a recursive function calls a procedure similar to a nested invocation of multiple functions, except that the calling function and the called function are the same function, and then his execution
      It's kind of like a spring.
    • 2. This week we studied the application of construction and multi-level pointers.
2. Learning experience.
    • This week has a pointer to the exam, the test is not ideal, I analyzed the following reasons:
      1. This week the code is not often touched, so in the exam when some knowledge points forgotten, such as
      STRCMP was mistaken.
      2. There is no clear understanding of the pointer, so the use of pointers is very confusing.
    • So I realized that learning should be sustained, to understand C language.

C Language Blog Job--function nested call

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.