-
In fact, it's not difficult to learn C, the key is that you have to find a teacher who suits you or self-study**, I didn't learn when I signed up for the class, and then I didn't learn it online**, I read it at the beginning, Mr. Xia's, I feel that the lecture is very concise and clear, the kind that you can understand when you listen to it, and what you talk about is the key, and there is a difference from others is that there are many difficult concepts with metaphorical examples, for example, the array I recently saw is compared to a box with things in order, and I understand the array variables and assignments at once. It's much better than what I read before, Hao Bin and Zeng Yi's cumbersome like reading a textbook.
-
Hello, sum is a variable of int integer.
The function of this ** is to define an int integer a=123; an int integer of b = 456;
Then a and b are added and assigned to sum, that is, sum is the sum of a and b.
The value of printf is then output to the terminal in decimal %d.
-
The subject diagram has already been annotated,The function of the max function is to find the greater of two numbers。To illustrate by example.
1)int max(int x, int y);This part is the function definition, and int indicates that the return value of the max() function is of type int. int x, int y represent the formal arguments x,y. In the actual invocation process, you need to pass in the actual parameters.
2) The part in the body of the function.
First, the variable int z, which is used to store the compared value, is declared.
Then use the if statement to make a judgment, compare the size of x and y, and assign the larger value to z.
Finally, return, returns the value of z to the major key function.
3) Suppose the incoming x=200, y=100
Execute if(x > y) z = x; In this case, compare x>y, that is, 200>100 is true, and the value of x will be assigned to z, that is, z=200, and the return statement will return the value of z.
4) Suppose the incoming x=100, y=200
Execute if(x > y) z = x; In this case, compare x>y, that is, 100>200 is not true, the else statement will be executed, assign the y value to z, that is, z=200, and the return statement will return the z value.
-
The programming learning method is as follows:
1. Focus on cultivating ability. C language is not a purely theoretical course, but an applied course. Attention should be paid to cultivating the ability to analyze problems and to analyze them carefully.
2. It is necessary to focus on the idea of problem solving, and learn how to design an algorithm and construct a program through a large number of examples. At the beginning, you have to learn to read the love program, write a simple program, and then gradually go deeper.
Grammatical details are important to master over a longer period of time. At the beginning of the lesson, it is important not to prematurely abuse certain error-prone details of the C language, such as inappropriate use of ++ and --。
3. Master the basic requirements and pay attention to laying a good foundation.
4. It is necessary to attach great importance to the practical link. You can't learn programming just by listening to lectures and reading books, and learning C language requires not only mastering concepts, but also having hands-on programming, and debugging and running by yourself.
5. Draw inferences from one example. Learning programming is mainly to grasp the ideas and methods of programming, learn to program in one computer language, and it should not be too difficult to switch to another language when needed. No matter which kind of programming is used.
The original rules are the same, when learning, we must learn and apply, draw inferences from others, master the rules, and be able to quickly master other new languages for programming when it is important.
2. 1, True 2, False (there is only one program) 3, False (not necessarily) 4, True. >>>More