Help me with three C questions, thank you

Updated on educate 2024-02-09
5 answers
  1. Anonymous users2024-02-05

    Question 1: Something is missing here:

    if(aelse k=b%a;

    Probably wanted to write:

    if(a>b) k=a%b;If a is greater than b, then k is equal to a and b;

    else k=b%a;Otherwise, k is equal to b and a ;

    "Remainder" is the number left after the previous number is divisible by the next number.

  2. Anonymous users2024-02-04

    1.Right?

    main()

    int x=1,y=3;* Let the integer variable x,y, where x=1, y=3*

    printf("%d,",x++)

    The result of x++ is output, x++ means that x participates in the operation and adds 1, and the value of x is 2*

    int x=0;x+=y*2;

    Let x=0, calculate x+y*2, and assign the result to x, where the value of x is 6*

    printf("%d,%d, ",x,y);* outputs the values of x and y, which are 6 and 3 respectively

    printf("%d,%d\n",x,y);

    Finally, the values of x and y are output and then the line is wrapped. Because the x and y values here are not affected by the statement in {}, they are still 2 and 3*

    main()

    int i;Set the integer variable i

    int a[3][3]=;*Let the integer two-dimensional array a[3][3]*

    for(i=0;i<3;i++)

    loop, which starts when i=0 and adds 1 to the value of i when i<3, otherwise it jumps out of the loop*

    printf("%d ",a[2-i][i]);*Output a[2-i][i] result*

  3. Anonymous users2024-02-03

    First question, I don't know what you wrote. It's a mess!

    In the second question, x++ outputs the value of x first and then x+1, so it outputs 1 first, and the current value of x is 2;

    Inside x=0, x+=y*2 is equivalent to x=x+y*2, x=0, y=3, so x=6, output 6 and 3;

    Finally x=2, y=3, output 2,3

    The third question, a[3][3] is a two-dimensional array, in which the numbers are a[0][0]=1,a[0][1]=2,a[0][2]=3,a[1][0]=4,a[1][1]=5,a[1][2]=6,a[2][0]=7,a[2][1]=8,a[2][2]=9;

    So the output is 753

  4. Anonymous users2024-02-02

    There are a lot of mistakes in these questions.

    a[3] is an array that means that there are 3 elements in array a.

    x++ is to output x first and then x+1

  5. Anonymous users2024-02-01

    0xeb

    0xeb0xeb

    0xeb result is 0x75

    The same can be said. 0xec

    0xec result is 0x76

    So the first question is A

    For the second question, choose D

    You are welcome.

    Related questions
    4 answers2024-02-09

    It's not very hard that the tail node next points to null. >>>More

    8 answers2024-02-09

    1. When electrolysis, remember that the cathode is connected to the negative electrode of the power supply, which must provide electrons, so the reaction that occurs at the cathode is the reaction of obtaining electrons, and the electrons that can be obtained are either inactive metal cations, or H+ (in acidic solution), or water (in neutral or alkaline solution). Then look at what electrons can be obtained in the solution: Mn2+, H+, H2O, the world is more active than H, and it is in an acidic solution, so it is H+ that gets electrons. >>>More

    12 answers2024-02-09

    An escape character is a special form of representation of characters in the C language. Escape characters are commonly used to represent non-printable control characters and function-specific characters in the ASCII character set, such as the one-apostrophe (which is used to represent character constants'), which is used to represent a double apostrophe (") and backslashes (etc. Escape characters are represented by a backslash followed by a character or an octal or hexadecimal number. >>>More

    12 answers2024-02-09

    The first one can't say you're at fault, your n goes from 1 to 3 to 5....This way your n is always odd, so you're actually looking for 1+3+5....But the meaning of the actual question is to ask you to judge whether the following n is odd or not. >>>More

    10 answers2024-02-09

    6.Apprentices process per day: 40 4 5 = 32.

    Machined parts: (50+32) 3=246 parts. >>>More