C language problem, help, thanks!

Updated on society 2024-05-24
5 answers
  1. Anonymous users2024-02-11

    Read a character, then output it to the screen, and then judge that the character is not '? If you don't read it again, stop it.

    The result is: right?

  2. Anonymous users2024-02-10

    That's all about typing in any character and outputting the original character! If you don't touch the character ' during output? 'then execute while() until there is'? 'Appear, output and end the program!'

    On the image you can see that the characters I typed don't end until the end!

  3. Anonymous users2024-02-09

    Problem 1: The first is to figure out the compilation process when defining.

    int n = 2 defines an integer variable n, assigns a value to 2p = &n, defines an integer pointer p, points to the address of variable n.

    q = p;Define an integer pointer q and assign p to it, i.e. assign the address of n to it.

    ABCD is just a simple assignment operation, of course, all correct, mainly to understand their meaning.

    Q pointer assignment is to assign the address to pb*p = *q data assignment, which assigns the data that q now points to the address to the data that p points to.

    q Data assignment, assign the value of q to the address to the variable n= &n pointer, and assign the address of the variable n to the pointer pQuestion 2: (strlen(s), you made a mistake)."Escape symbols, one is"\"meaning;

    x"an escape symbol, which may indicate an unsigned hexadecimal;

    The escaped symbol belongs to this string, but does not occupy the length of the string. Therefore, the string is"\41xyz", the true length is 5, and the output is 5.

  4. Anonymous users2024-02-08

    In the first question, all four are valid, p points to n, p is assigned to q, and p and q are both pointers to n.

    The second problem, compilation error, strlen accepts the first address of the string, if you really want to learn a little better, you can debug it more.

  5. Anonymous users2024-02-07

    There are a lot of questions, and my humble opinion is as follows:

    1. We know that the name of an array is the first address of the array, and the one is a pointer, so a is a pointer to a two-dimensional array. (We might as well write a[0], a[1] as x, y.) Then the array that a points to is x[3][4], y[3][4])).

    2. Because the identifier in front of the number of elements of an array can be regarded as the array name of the array, then a[0] here is the array name of the two-dimensional array (equivalent to the x mentioned above). And just now we see that we can think of a[0] as the x in x[3][4], then we know that x actually points to a one-dimensional array of size 4, then a[0] points to a one-dimensional array of size 4.

    In addition, a is the array name of the three-dimensional array, so it represents the first address of the three-dimensional array (that is, the first address of 0 rows), that is, &a[0][0], and a[0] we just mentioned, it is equivalent to the first address of the two-dimensional array, that is, the first address of 0 rows and 0 columns, so it is &a[0][0][0]. And a[0][0] is equivalent to the first address of a one-dimensional array, that is, the first address of 0 rows, 0 columns, and 0 verticals, so it is also &a[0][0][0].

Related questions
18 answers2024-05-24

What about the problem. Do you want an icon?

4 answers2024-05-24

org 0000h

ajmp main >>>More

3 answers2024-05-24

private static int find(int num)int max = num[0];

for(int i = 0;i < i++)if(max < num[i]) >>>More

17 answers2024-05-24

There are ones in every district, so I'll just say my clothes. >>>More

12 answers2024-05-24

It could be due to several reasons:

a. The card is not properly inserted, the sound card is not closely integrated with the expansion slot of the motherboard, and the "gold finger" on the sound card and the reed of the expansion slot are misaligned through visual vision. This phenomenon is common on ISA cards or PCI cards, and it is a common fault, and finding a way to get the sound card plugged in can solve the problem. >>>More