-
Forget it, I'll type more braille today.
I'll just talk about the reason for the results under VC++, due to different compilers, different ways of combining, there will inevitably be different results.
j=(++i)+(i);
j=(++ij+(+i)+(i);
j=(++ij+(+i)+(i)+(i);
Let's start with the first one: when calculating, there are two storage spaces, if it is defined as register A and register B, put the two ++i in A and B respectively.
Execute ++i first, at this time, i=6, and after executing ++i once, at this time, i=7.
Since registers A and B are both i, (a) + (b) = 14 (parentheses indicate the value) are executed again, which is 7 + 7 = 14.
What about the second? In the same way, after calculating the sum of the first ++i and the second ++i, the result is 14, and then the next ++i is calculated, which is 14+8=22, and i=8.
The third one: it's 22+9=31, and ++i is executed first, so i=9.
Different compilers combine different methods, and the natural results are different.
-
Different environments are different. Excuse me!
Most people recommend not using self-increase or self-reduction, as different environments will have different results. It is also difficult to understand the program. You can use other ways to achieve your goals.
-
Hehe, Xiaosheng has just figured it out. Self-incrementing, subtracting points (plus, minus) before and after. The prepend is to add and subtract 1 before referencing the variable. The latter is quoted first, then added and subtracted. Take care of it.
-
main()
int i=0,j=0,k=0,l=0;
print("%d/n",i++)
print("%d/n",j--)
print("%d/n",++k);
print("%d/n",--l);
print("%d/n",i);
print("%d/n",j);
print("%d/n",k);
print("%d/n",l);
Take a look at the output and you'll understand.
-
**Don't understand?
Complement Point Operator:
1) |Bitwise or operator: result=exp1|exp2;If at least one of the corresponding bits in exp1 and exp2 is 1, the corresponding bit in result is 1, otherwise it is 0.
2) & Bitwise & Operator::result=exp1&exp2;If the corresponding bits in exp1 and exp2 are all 1, the corresponding bits in result are 1, otherwise 0.
3) Bitwise XOR operator: result=exp1 exp2; If the corresponding bits in exp1 and exp2 are not the same, the corresponding bits in result are 1, otherwise they are 0.
4) Invert Operator: Inverts all bits in the bit container, 1 becomes 0 and 0 becomes 1.
5) "Bitwise Left Shift Operator: exp<> Bitwise Right Shift Operator: exp>>n, shift all bits in the container to the right by n bits, and fill the vacated bits with 0.
7)|=, &=, = correspond to |, respectively& Composite operators for the three operators.
-
If you pass the perpendicular line of point C as AB, you can calculate the length of the perpendicular segment as, that is, the third one is incorrect (it is tangent).
The Pythagorean theorem can be obtained by ab=5, by the area method.
Let the hypotenuse be high h
then there is 5h=3*4
The solution is h=1, and 2 is correct.
-
Option d All three propositions are true.
The owner of the watchtower The owner of the building can ask me at any time if you have any questions Thank you.
-
This is a major in architectural engineering, each stair tread is between 15 and 18cm, and the general height is not less than 2m
2 steps or so. If it's a double run, it's just 9 steps.
I can't make it clear in a few words here, so I suggest you make a design friend. Or find an experienced applicator.
-
If you want to learn single-chip microcomputer, you don't necessarily have to learn assembly, but if you want to become a master, you must learn assembly, because the learning of assembly will greatly improve the understanding of the working principle and process of single-chip microcomputer, and will increase perceptual understanding. In addition, in some real-time applications, sometimes it is difficult to meet the strict timing requirements with the C language, and it is necessary to use C and assembly together, which I have encountered when I was making a CPU card reader.
The 51 single-chip microcomputer is not difficult, and it has been launched for more than 20 years, but it cannot be said that it is backward. The computer runs fast, but you can't always use the computer to control all places, right? Therefore, each has its own use, not this ratio, at least at present in the industrial control, instrumentation and other industries or a lot of achievements, low **, few peripheral expansion circuits, rich series of models are determined not to be eliminated in the short term.
Relatively speaking, the cost of ARM is still high in these industries, and ARM's current goal is mainly to develop upwards and shorten the distance with the computer CPU, which also determines that the 51 single-chip microcomputer is still vigorous.
Starting from your current situation, I think this approach can be taken: first look at the basic information of the single-chip microcomputer to see if you can understand its hardware principle, and if you can suggest that you study the assembly in depth; On the contrary, there is no need to worry, and I will talk about it later, because I don't think it makes much sense to learn the assembly if it doesn't cooperate with the hardware foundation. Since you are not majoring in electronics, and if there are no courses in the future professional courses, you need to rely on yourself to improve the hardware level, which takes a lot of time and energy.
In terms of language, if you want to focus on hardware in the future, you can learn C and assembly, and learn other languages as needed when you work in the future; If you want to focus on software in the future, you can forget about compilation, but I am afraid that you will still need to take time to study theories such as databases and data structures. I'm not in the business of software, so I won't say much about this, so as not to mislead people.
After learning 51 single-chip microcomputer, you should still learn ARM, after all, its performance is much stronger than 51 single-chip microcomputer, and it will be widely used in the future, which is also beneficial to finding a job in the future. 51 Learning is to lay the foundation, and it is easy to learn something else later.
Finally, you can learn the microcontroller well by self-study, and the first batch of people who use the microcontroller are self-taught, and you shouldn't be worse than them. As long as you want to, you will definitely become a master, there is really nothing mysterious.
-
If it's just at the application level, C is completely sufficient, and the portability is better.
Learning is generally from simple to complex, starting from 8-bit single-chip microcomputer (51 is very good), to figure out the working principle and design method. Then learn 16-bit (it is recommended to learn MSP430), and then you can learn 32-bit single-chip microcomputer if you have the energy, and then go to the operating system, learn embedded systems, and reach this level It is not a problem to find a job with an annual salary of more than 100,000 yuan in Shanghai.
-
You don't have to learn assembly, you can use c, microcontrollers are similar, no matter what you learn, you have to figure out the functions of the microcontroller, such as how much memory is, how many timers, what interruptions, etc., when doing projects, decide which functions to use according to specific needs.
-
MCU on that point,Simple,First figure out the structure,Assembly and C are very easy,It is recommended to read the compilation textbook first,Then look at the case of C,And the actual development mostly uses C language。
-
Then it is more difficult to learn by yourself, and it is better to find a piano shop to learn with your own band. It's better to buy a book first, and it's faster to read it.
-
That's so difficult. It's best to find a teacher to teach you.
-
Very well written. But it's rare that someone has come to write about this.
Stuff was written out. Hi me.
-
This doesn't seem to have much to do with the number of students. Found you hilarious.
-
Why just 0 points, leave some ink!
From this point of view,Your computer is not the right driver,There is a prompt on the blue screen for a character such as (0x00007) and the like,There is a specific description of whether it is a hardware driver or a software conflict,But from experience, it is mainly a hardware driver conflict,It is recommended to ** with the new hardware driver and then it should be no problem!
Words - "Words by Class" Zhang Hongyan's, gray is often good It is worth recommending, I memorized it 3 times. >>>More
Connect the two hard disks to the optical drive cable and then turn it on to see how it works, if it doesn't work, it's a memory problem, first go to the next one, maybe it's OK.
1. Look at the Bible to understand the truth.
Two: You will understand that everything God has created is in the hands of man, so you can enjoy it as you need. >>>More
You try it with the recording software that comes with the system, and if the recording is completed, you can hear the sound. If you say it directly, it won't be expanded. Or you can try voice chat to find out if the microphone is broken. >>>More