Find the running result of the following program, and Java find the running result of the following

Updated on technology 2024-05-20
4 answers
  1. Anonymous users2024-02-11

    The program is very messy, and there are mistakes, let me analyze it for you.

    main()

    int i=1,n=3,j,k=3;Assignment, nothing to say.

    int a[5]=;It's also an assignment.

    while(ia[i])i++;It's wrong here, I don't know what ia is.

    Change ia to a, and the final i is the number of bits stored in the array, which is 3for(j=n-1; j>=i;j--)a[j+1]=a[j];I don't do this sentence because j=2, i=3

    a[i]=k;Assign a[3] to 3, which is the fourth number.

    for(i=0;j<=n;i++)

    printf("%3d",a[i]);Endless loop, because j can never be greater than n, so it can't jump out.

    If the loop is changed to i<=n, the output is 1453

  2. Anonymous users2024-02-10

    Overall, it's a terrible program.

    1)while(ia[i])i++;ia[i], what is ia, this is a mistake.

    2)for(i=0;j<=n;i++) doesn't handle j at all, so this loop either doesn't execute or is an endless loop.

  3. Anonymous users2024-02-09

    30 questions. s=180

    The following figure shows the execution result:

    29 questions. The following figure shows the execution result:

    31 questions. Out of array!

    Exception Handling Ended!

    The following figure shows the execution result:

    Hello! Above are the answers written, as well as the results of the tests you did. Please confirm.

  4. Anonymous users2024-02-08

    Program error, prt(&a,&b&c); Missing a comma pr(&a,&b,&c);

    The answer is 11, 41, 20

    Then you have to ask why the mold Li cover c is still 20, then let's take a look at the program:,+x,++y,*(z++) just look at the *(z++) This two running order I write:

    1.Output *z because z++ runs z first and then z.

    What does it mean, it's not 20 plus 1, because this z is not *z, its self-addition will not affect the number 20, but the address it points to plus 1, if the original address it points to is 100, then now it is 101, so the second output is still 20, because 20 has not been changed, and every time you run this function, the assignment of z will be reset, not the address of the original scramble, so it is still the address of 20, and the output is of course 20I don't know if you get it!

    If you understand, you can reward me with a small flag to play!

    Continue,Didn't I say that every time you run the prt function,Z's assignment will be reset?,That is, if you don't run the prt function once,The value of z will be given the address of the number 20,And after the end of this function,The value of z will disappear,So the next time you run it's still the address of the number 20,Now you know?

Related questions
5 answers2024-05-20

The ** provided is mainly based on the following two errors: >>>More

6 answers2024-05-20

I'll give you an affordable suggestion for this.,I don't know where you're there.,You go to** search above,24 cores,16 cores of dual CPU machines can be,** It's not expensive above, it's cheap about the price between 6000-15000, in fact, I was optimistic before I completed the dilemma and wanted to buy the 16 core of more than 8800, as long as the configuration and the boss confirmed it, it will be soon, this is more affordable, if you want to buy it in the computer city, it's a little too expensive, if I don't buy a house, I'm going to buy it with a tight hand, I also do 3D rendering, I have a buddy who bought it very well, I hope it will be useful to you!

10 answers2024-05-20

Actually, I've seen a lot. Well, it's expensive. Are you going to buy it for me? >>>More

4 answers2024-05-20

when we were young, we lived in ourselves

chasing dreams, hiding in our >>>More

17 answers2024-05-20

1: Add a memory module.

2: In the registry or with 360 to reduce the boot startup items, reduce the running of unused programs. >>>More