20165105 Learning Basics and C-language basic survey

Source: Internet
Author: User
Tags wubi

First, skills learning experience

1. What skills do you have that are better than most people?
I think my ability to accept is very fast, the first time of the semester of physical education in the water to master the float, the third time to master the backstroke, the seventh time to learn the breaststroke ventilation, the final physical education of 98 points; The first ski clearance observation found the bottom of both feet glide tips, Through the practice can basically abandon the staff (second grade in primary school, sliding over two years roller skating), slip the high-grade snow slide never fell.
2. What are your successful experiences with the acquisition of this skill?

I summed up the experience has two points, 1th is thinking, 2nd is to be brave to practice, 3rd is perseverance.

    • Before practice, we need to think a little bit, find the right direction and start again, otherwise it will be very easy to see the opposite situation.
    • In practice to be good at thinking, and constantly experience, and constantly revise the direction, there is such an experiment, in a large enough space, a blindfolded person walking out of the trajectory is an approximate round, which is the size of the foot and the pace of the inconsistency caused by the person. Generally speaking, most people's right foot is always bigger than the left foot. When we open our eyes, we constantly fine-tune our walking routes to make them straight lines, depending on the reference we see in the eye. But close your eyes, is to go to the reference, also can not play this adjustment function. At this time, people also always feel that they are walking in a straight line, take office from the two feet naturally forward, the final result is that people involuntarily to the left offset. We blindly learn the process of new things, it is the same as we are blindfolded walking process, so we do not blind, to open our eyes, and these eyes is our good thinking brain, full of thinking, can let us go a lot less detours.
    • After the practice, we need to reflect more, summed up the practice of the lack of thinking about the solution, can let us closer to success.

Learning must not be on paper, it is like swimming, if not in the water, regardless of the movement of the study in place, the same is a dry duck, is forbidden to test the facts. So overcome the latent fear consciousness in our hearts, not afraid of difficulties, not afraid of failure, adhere to always succeed. Physical education can get a higher score, and continue to practice is inseparable, except once a week of physical education, every weekend at least go to a swimming pool. My extra harvest is a semester thin under 32 pounds.

The teacher's blog, mentioned the idea of doing secondary school, I personally very much agree. In my opinion, what things, only their own pro-Pro to do, to ponder the principle of the method, can be made. Otherwise, in the face of one thing, you just go to fantasy, think of the hype, it is just your fantasy empty talk, not yourself to learn to do it. An article in the blog is about Wubi typing, Wubi typing is a relatively difficult type of typing, but as long as it is more practice, we can master the typing method, visible practice and the importance of training. and Wubi typing method seems difficult, but it also contains the law, to find out the law, look for the feeling, Wubi typing can also be done. Then I saw the teacher about the training of table tennis blog, I also have a feeling. I have a feeling of basketball, and the teacher to ping-pong feeling have similarities, I started when also just casually play, the ball to the sky a throw, tube you walk not walking, happy good. However, as the contact with the door deepened, the more I want to train my basketball skills to practice better, do more professional. It is a long and arduous process to practice and practice diligently, but it is a process of progress, and no one's success can be achieved overnight. These learning processes emphasize the importance of practice, and I think it has something in common with my training in basketball. Practice is the king, do not practice difficult to become.

Summing up their experience and the success of Lou's blog, I think that Java Learning Needs day after day efforts and perseverance accumulation, and thinking into the efforts to achieve good results.

II. Survey on C language learning

1, how do you learn C language?
Freshman C language course by Xu Xq teacher lectures, class seriously listen, remember good notes, especially pay attention to Xu teacher put forward the problem, after class seriously digest the knowledge, in the operating system to try to write code, easy, from simple to difficult, constantly brush questions, really want to find a teacher or learn good classmate answer questions, Try to master each of the algorithms, grasp the details, each time feel that they have a little improvement, is to complete an experimental class, only in the experiment encountered the complex requirements, can really test their own shortcomings in learning.

Estimated code written about 3000 lines, in addition to the complex code required by the experimental class, are not too complex, basically can understand, complex procedures understanding is not deep enough, simple code understanding thoroughly, in the gradual understanding of complex code, quantitative change will eventually lead to qualitative change, the speed of qualitative change depends on the degree of effort.
3, learned the C language, you divide the array pointer, pointer array, function pointers, pointers function these concepts?
Array pointer: essentially a pointer, pointing to an array, with a row pointer and a column pointer.

Array of pointers: The essence is an array, consisting of multiple pointers of the same type.

function pointer: The essence is the pointer, pointing to the function.

Pointer function: The essence is a function, the parameter is a pointer variable.

4, learned the C language, you understand the file and stream the difference and contact? How do I differentiate between text files and binaries? How do I programmatically manipulate these two files?

    • files are the basic unit of Computer Management data and an important place for applications to save and read data. A stream is an abstract concept of a sequence of bytes, such as a file, an input/output device, an internal process communication pipeline, and so on. Stream provides a way to write bytes to the backing store and read bytes from the backing memory. A stream is a segmented operation that does not exist permanently, and the file is a solid, fixed storage.
    • Each digit in a text file occupies a single byte of storage space, while a binary file stores the entire number as a binary number.

--from Baidu
5, learned the C language, do you know what is called process-oriented programming? What is the way it solves the problem?

The process will be divided into several processes to achieve the task, that is, the division of different modules, and finally in the main function of a number of modules concatenated together, step by step implementation, specifically through the call function, and so on, from the part to the whole, from the details to the global.

6, in the C language, what is the module? Have you ever written a program for multiple source files?
A program or subroutine required to complete a function, or a stand-alone program unit that can be processed by a compiler, assembly program, or a part of a large software system;

I haven't written it yet.
7, learned the C language, you know what is "high cohesion, low coupling"? How does this principle apply to high-quality programming?
This is really unclear, through Baidu understand a bit,

Cohesion is the measurement of the connection within the module from a functional point of view, and a good cohesive module should do exactly one thing. It describes the functional linkages within the module. Coupling is a measure of the connection between modules in a software structure, and the coupling strength depends on the complexity of the interface between the modules, the points entering or accessing a module, and the data through the interface. Cohesion Poly-low coupling, is the concept of software engineering, is the standard for judging the quality of design, mainly object-oriented design, mainly to see whether the cohesion of the class is high, coupling degree is low. high cohesion refers to a software module is composed of highly relevant code, only responsible for a task, that is, the principle of single responsibility; low coupling means having each module perform a specific sub-function as independently as possible. The interface between modules and modules is as small and simple as possible.

In other words, let each module, as far as possible, complete a specific sub-function independently. The interface between modules and modules is as small and simple as possible. If the relationship between the two modules is more complex, it is better to consider the further module division first. This facilitates modification and combination.

--From 36,000 subjects


8. Having learned C, how do you copy the contents of array A into array B? How do I find the number 5 in an integer array a?

#include <stdio.h>#defineN 5Main () {intA[n],b[n]; inti; printf ("Input Array a:\n");  for(i=0; i<n;i++) {scanf ("%d",&A[i]); } printf ("b array: \ n");  for(i=0; i<n;i++) {B[i]=a[i];//End of Swapprintf"%d\n", B[i]); }     for(i=0; i<n;i++) {scanf ("%d",&A[i]); }     for(i=0; i<n;i++)    {            if(a[i]==5) printf ("a[%d]:5!", A[i]);//position in the array where the output "5" is locatedExit0); }}

9, how to sort the integer array a (from small to large, from large to small)? Write the corresponding program.

#include <stdio.h>#defineN 10voidPaixu (intA[],intN) {    intI,j,c;  for(i=0; i<n-1; i++)    {         for(j=i+1; j<n;j++)        {            if(a[j]>A[i]) {C=A[j]; A[J]=A[i]; A[i]=C; }}}}main () {intA[n],i;  for(i=0; i<n;i++) {scanf ("%d",&A[i]);    } Paixu (A,n); printf ("from large to small after sorting: \ n");  for(i=0; i<n;i++) {printf ("%d\n", A[i]); }}

Write a program that counts how many lines of code your C language has written.
Think about, only a little bit of a clue, involved in the operation of the document is not mastered, short time to write, I will take this part of the course in the future.
Do you know what a breakpoint is? Give an example of your own debug program.

Breakpoints are set artificially, meaning that the program executes to this "stop" and does not go down.

Example: In the case of code compilation problems, we often have to use the teacher's "single-Step Debugging" method (debug) to analyze the function of the process of parameter transfer.

Ask questions
1. What are the features of the Java language?

2, Java data structure type and C have a lot of the same, there is no other than the two algorithms in the data structure?

3, Scanner reader=new Scanner (system.in);

4. What is a "class"?

5. What is the relationship between subclasses and objects?

6. Specific differences between interfaces and abstract classes

7, inner class and exception class how to understand?

8, so many classes, those are commonly used in those not used?

No, I can't see it.

Java Learning goals and approaches
I will focus on their weak aspects of learning, class, more to do, ask, think more, listen carefully in class, take notes. The improvement of programming ability depends on the cultivation of thinking, need to do more exercises, this is the most effective way to learn each language, like the teacher in Wubi learning requirements: "Hands faster than the brain."

20165105 Learning Basics and C-language basic survey

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.