C language, which I can t understand, do me a favor

Updated on educate 2024-08-07
17 answers
  1. Anonymous users2024-02-15

    10%10 = 0 Why is it equal to 0 Because % is the remainder of 10 divided by 10 and the remainder is 0.

    c stands for what does it mean, and what does it mean, and why is the value of + 4 equal to 5?

    c is the meaning of c=c+1. ++ means plus 1. ++4=4+1。

    But note a little ++c at 21 and c++ at 20. But the c's are all 21. The difference is between ++ and last, if you calculate the value of adding 1 first, and take the value of c to represent this equation first.

    Distinguish between ++c and c++. If c=20;Then do these two equations, then yes.

    C is 21 for the result, C is 20 for the result, and C is 21.

  2. Anonymous users2024-02-14

    10%10 = 0 means finding the remainder of 10 divided by 10 It must be 0+c means that the variable c adds 1, ++ is the variable self-addition operation, ++4 is 4+1 of course 5.

    A variable is a number stored in a computer, represented by one or several letters, and its value is variable) a=3; b=5;

    c =++ a* b;Equivalent to a=a+1; c=a*b;

    Note that now a=4 b=5 c=20).

    d =a + b;Equivalent to d=a*b;

    At this point, a=4, b=5, d=20).

    a=a+1;

    At this point, a=5, b=5, d=20).

  3. Anonymous users2024-02-13

    This is the modulo division operator.

    Modulo division is the division of two integers to take the remainder; It is required that both sides of % must be integers;

    The difference between a and a++.

    a is equivalent to a=a+1;

    a++ is equivalent to a=a; Then a plus 1

  4. Anonymous users2024-02-12

    10%10 means the remainder of 10 divided by 10, which is of course 0.

    is self-adding, ++c is adding 1 to c before the operation, and c++ is adding 1 after the operation

    Hehe, I'm also learning C++ for a month, and I'm also a beginner.

  5. Anonymous users2024-02-11

    i = i %= j has a value of 0i = 3 2 * j = 3 - 2).

    The same question answers.

    Question 1 Analysis:Variables: int i = 10, j = 5;

    The priority of operators = and %= is the same level, and the combination is from right to left, so first calculate the %= operator on the right, that is, i%=j first, this expression is equivalent to i=i%j, i = 10 % 5, the result is 0, and then 0 is assigned to variable i, so variable i

    The value of 0 is . Analysis of the second question:Calculate the parenthetical expression first, then j = 1, then 3 2 * 1, because the result of 3 2 is 1 (both are integers), so the value of variable i is 1.

    Test**.

  6. Anonymous users2024-02-10

    Need to understand here"="The number is an assignment number, not an equal sign, in the C language"=="is equal to. and take the remainder in the formula, int i=10, j=5;

    So i=i j, i=10 5=0, i=3 2*(j=3-2), you need to calculate the right side first, and assign the value to i, i.e., i=3 2*1 (in mathematics, i is ultimately equal to, but because i is an integer, i=1 is said

  7. Anonymous users2024-02-09

    This is a complex pointer with a right-to-left reading rule. Reading: Start with the identifier (as in the t, read to the right, encounter the back parentheses) and then to the left. From the inside out, until the end of the reading.

    For example, t, 1) right reading, t is an array of 10 elements. In case of inverted parentheses, read to the left, the element type of the array is the pointer.

    2) Where does the pointer point? Reading to the right, I came across [10], which turned out to point to an array of 10 elements.

    3) The element type of this array is int*

    However, it is obvious that the meaning of the title does not need to be read at all, because it is enough to find the exact same form, and it is obviously d.

    Complex pointers are generally used in DLLs, low-level calls, etc., and are not usually used.

  8. Anonymous users2024-02-08

    It doesn't make much sense even if you figure it out, who defines types like that, if I give up.

  9. Anonymous users2024-02-07

    The meaning of this problem is to count the number of numbers from 0 to 9 in the string str, where the ten elements of array a store the numbers from 0 to 9.

    The difficulty is in A[(*P-48)]. 48 is the ASCII code of '0', '1' is 49, and so on.

    p points to each character in the str. When *p is one of 0-9, e.g. *p='1'then *p-48='1'-48=49-48=1。Then a[1]++ will be executed, i.e. the number of occurrences of '1' will be +1

  10. Anonymous users2024-02-06

    Answer: 0-0 1-4 2-2 3-2 4-2 5-0 6-2 7-2 8-0 9-0 is to count the numbers from 0 to 9 in the string above. For example, 1-4 means that there are 4 1s

  11. Anonymous users2024-02-05

    Hello. This is a more basic C language practice question. Of the three loops, the first loop is array initialization, i.e. all values are assigned 0.

    The core function lies in the second loop, which is function 1Scan the entire str array, 2If the ASCII code of a character is 0-9, the value of the array corresponding to that value is +1.

    That is, the function is to count how many times each number appears.

    The final output format will be: 0-0 1-4 2-2,。。 It means that the number 0 appears 0 times, the number 1 appears 4 times, and the number 2 appears 2 times.

    I hope you will be patient and careful to understand the procedure according to my description, and I hope you can understand him.

  12. Anonymous users2024-02-04

    Count the number of occurrences of each number from 0 to 9.

  13. Anonymous users2024-02-03

    C language: General Programming Language.

  14. Anonymous users2024-02-02

    This is a computer programming logic language, you need a system of learning, if you really want to understand, you can buy some C language books to learn, there are also courses on the Internet, but if you are not bad money, you can sign up for a class, this is the best. Thank you.

  15. Anonymous users2024-02-01

    1)b='a'Equivalent to b = 97 ('a'The ASCII code is 97) C>3 is true, and then the value after && is calculated.

    A value of 0 is 1 (0 is false, non-"false" is "true", and a value of 1) 8<1 is false.

    So the first value is 0

    2) A value of f 3 that is not 0 is true).

    The value of a-b is -95

    The second one has a value of 1

    3)!(95) has a value of 0

    4) a=7 is an assignment expression with a value of 7

    a=7)>6 (true).

    b=-1) has a value of -1

    b=-1) >6 is false, and the fourth has a value of 0

  16. Anonymous users2024-01-31

    One of the computer programming is not easy to learn when I was in school, but now I can't use it, so I still have to rely on my own hard work.

  17. Anonymous users2024-01-30

    The following variable declaration has static, indicating that these two variables will not be redefined until the end of the program, so what is the value of the variable after the first call, and the second continuation of the value of the variable after the first call.

    After the first execution, m=

    The second time, i = 3 + 8 + 1 = 12 and m = 12 + 4 + 1 = 17

Related questions
8 answers2024-08-07

Just by reading the first chapter, you want to understand C right away, that's impossible. It is recommended that you be patient and focus on the definitions of the C language, and have a clear understanding of the rules, methods, and structures of use. The examples in the book are mainly to explain the concept, which may not be incomprehensible to new scholars, but that's okay, as long as you have the patience and keep reading, after basically reading half of the content, you can easily understand it when you go back and look at the previous examples. >>>More

8 answers2024-08-07

I thought about it for a long time and didn't come up with it. >>>More

16 answers2024-08-07

Definition of a for loop.

for(the initial value of the variable; termination of operating conditions; The initial value of the first cycle i is 0, and it runs until i=3 stops i=2, and the condition is still satisfied, and the loop body is still executed, and the step size is 1+1 each time >>>More

9 answers2024-08-07

Hey! This is a very simple function to write, Your Excellency is estimated to have just learned data structures, now learn sorting, lookup, it's easy to give me a reward of two hundred points, I'll help you write it right away. >>>More

7 answers2024-08-07

** in ** does not match the title. Please send a separate match**.