First, experimental work (6 points) 6-1 recursive implementation of exponential function (15 points) Submit List
Design ideas
double calc_pow( double x, int n )声明函数{ 定义一个浮点型 result=1.0*x; if(n==0) return 1;当n=0,说明result =x的n次方。 否则{ return x*calc_pow(x,n-1);继续调用本身,来实现result*x
Code
The debugging process of the subject
This is the first time the practice, so there is a problem is that every time recursion will be the value of x changes, resulting in the final result error.
.2 Student Performance management system (5 points) 1.2.1 Drawing function module diagram, briefly introduces function function.
1.2.2 Show your project documents
1.2.3 Function Code Section
Total number of system code: 2561.2.4 Debug Results show
Feel this problem still exist some small mistake did not solve, so can not show out
1.2.5 debugging encountered problems and solutions.
When I was debugging, the put code never generated an O file. Causes the undefine to appear at the time of the Declaration. It's been too long to solve.
There is the search function will appear the program crashes, check for a long time to find out, go to school tomorrow to ask classmates
The final ranking
Third, read the code (1 points)
#include <stdio.h> #include <string.h> char *fun(char *t) 定义指针函数{ char *p = t; 定义指针p让他=t return (p+strlen(t)/2); 返回p后移4位的字符串} int main(void) { char *str = "abcdefgh"; 初始化指针 str = fun(str); 调用函数 puts(str); return 0; }
Iv. Summary of the study this week (1 points) 1. Learn about the week
1: This week the newly-learned content has recursion, in which recursion to notice must have recursive exit, recursive expression: such as fact=n*fact (n-1);
2: There is the teacher taught how to build the project, although not successful, but the basic operation still understand
3: Then you learn the pointer array, pointers to pointers and the relationship between two-dimensional arrays and pointer arrays
2. Learning experience.
This week the content of the study did not have a good grasp of the project, especially the construction works, always have the wrong tune I am very irritable, there is the structure of the structural body do not understand how to use, and the community, a little forget
The advance of the pointer at the beginning of the time is quite masked, and then after listening to the teacher will be the second class feel good some.
C Language Blog Job--function nested call