Please C language can also brother and sister into 5

Updated on amusement 2024-04-06
8 answers
  1. Anonymous users2024-02-07

    I've met a big brother who taught myself programming again.,Change the name of the variable first.。

  2. Anonymous users2024-02-06

    Yes, I taught myself C in high school. There is an example in Tan Haoqiang's book.,Actually, you skip this question.。。。 Listen to me right.

    Programs like this kind of recursive invocation are relatively rare in the practical use of the C language, because although the recursive program is small, it comes at the cost of a large consumption of the computer's memory space,,, and the recursive program itself is not very legible for others...

  3. Anonymous users2024-02-05

    In the insert seqlist function.

    for(j=l->length-1;j>=i-1;j++) here the logical error j++ is changed to j--

    Although there are still some imprecision, they can all pass, and the results are true.

  4. Anonymous users2024-02-04

    The answer is extern

    Auto refers to the ints, char floats, etc., which are allocated at compile time.

    register is a register variable, which means that the variable may be put into memory, and it is also compiled and allocated memory.

    extern means declaration, not definition, and means that the variable is declared in another file, so it doesn't allocate memory because it's already split (in another file).

    static is a static variable that is stored in the static area of memory, and is also allocated at compile time.

  5. Anonymous users2024-02-03

    (13) m=5, m2=2, for loop once i++, so output i=3;

    14) m=9, m2=4, for after the loop once i=3, at this time the if condition is established, so print 3, exit the loop, execute the next print statement, at this time i=3, so output 3, after the two outputs together show 3

    15) If you change it to continue, then the for loop will loop from i=2 to i<=4, and only i=3 satisfies the if condition in the for loop, so print 3, and after the cycle is completed, i=5, so print 5, (16); Empty statements, will continue to be executed, the principle is the same as 15 questions.

  6. Anonymous users2024-02-02

    There can be no mistake with the program.

    However, there is a problem with accuracy, because float-type variables can only retain a maximum of 7 decimal places, and no matter how small it is, there is a situation similar to rounding, in this case.

    x=(f(x2)*x1-f(x1)*x2)/(f(x2))-f(x1));x is defined as a float, when x is just equal to x1 after similar rounding, and the accuracy of f(x) is not up to the mark. At this point, you will enter an endless loop.

    It can be said that this is exactly the case with the equation you chose for this problem). The solution is to improve the accuracy: change all float data to double data, and change the input to.

    scanf("%lf,%lf",&x1,&x2);

    You can give it a try (I've tried it successfully.) )

    If you succeed, remember to give me extra points. (I studied for hours). Ha ha.

    Of course, there is another way to do this, and that is that you can change it to a larger program or another (but I guess that goes against your requirements).

  7. Anonymous users2024-02-01

    Your understanding is right.

    However, when deleting node, the linked list should be changed, so the next time it is executed from the head, the execution result will be different because the linked list is different.

  8. Anonymous users2024-01-31

    How is the white program going on after thinking about something simple and interesting (such as some small games, simple calculators or something), writing a few hundred lines of thousands of lines after some projects or something is just an empirical matter, remember, programming is a training process, not just reading a book or copying a book**.

    In addition, the virtual machine group is on the product**, which is super cheap.

Related questions
12 answers2024-04-06

In C, the types of functions can be divided into the following types: >>>More

6 answers2024-04-06

17-year-old boys still have to grasp the time to grow taller, but if they want to grow 10cm more, they have to work harder. Not only should you strengthen exercise, especially stretching sports (such as playing basketball and swimming), but also strengthen calcium supplementation, because calcium is an important element for bone growth. Calcium supplementation is not suitable for taking calcium tablets directly, it is recommended to supplement with milk calcium, so that the nutrition will be fully balanced. >>>More

7 answers2024-04-06

Note: This analysis is based on:

1,(from is a read-only property of public, sort has 17 overloaded methods, clone method inherits from object and is also defined in the array class, and copyto also has two overloads. So let's look at the length this way. >>>More

6 answers2024-04-06

C language is the language of writing system software, application software, such as Windows and DOS, are written in C language. Writing a program in C requires the compiler to convert the C format language into machine instructions, so that it can control the operation of the computer. Tuborc is the C environment under the DOC, VC, Brolandc is the C environment under the Windows environment.

7 answers2024-04-06

if(!a) x--;Meaning: if (!.)a) If true, execute x--。 Now 0 like a and 0 in c is false. So (!.)a)=true。So execute x--; >>>More