20165111 Learning Basics and C-language basic survey

Source: Internet
Author: User

The second time homework. Good job effect has improved, can be written after the discovery or this. I hope you have a lot of understanding. Or that sentence, the content is inappropriate, welcome correction!

First of all, explain the problem that the TA pointed out: My markdown code is in Lou teacher recommended Youdao Cloud notes, I want to design is a yellow focus, but that Code form Blog Park markdown Editor does not recognize, only the code as text show out. Also I observe not careful, sorry everybody!

A

"Find a better skill than 90%" and honestly, this 90% is the first to scare me. But then I thought--this 90% is a 90% of those people! If it is compared with the whole world, 90% of the people in China, that I do not have that ability, but if it is compared with 90% of the people around me, then I think, thick-skinned words, "speech" may be!

Since freshman attended the "I am the orator" in the department, many people said that I was very eloquent and asked how I practiced it. To tell the truth, I did not practice the speech skills. These things, at best, as a small time, often read some such as "archives" such as the story of the program, and then to learn some of the voice of the moderator and so on.

See the teacher recommended a few articles, whether it is to lose weight, or recite words, practice wubi, to achieve "do high School", the first is the mind to have "learning" the idea, followed by their own "learning" approach, that is, the heart of constancy, hand well.

Two

The following is the Teacher C language level survey answer

1. How do you learn C language? (Homework, experiment, textbook, others), what are the experiences and lessons of C language learning compared to your superb skills?

Mainly is the textbook + operating system. The subject of the experiment is not very difficult in itself, and it is not said alone.

2. How many lines of C code have you written so far? What is the understanding? Quantitative change caused qualitative change, how to balance the quality and quantity?

Or as I said on my first assignment, I don't remember how many lines of code I wrote, but every piece of code, and each one of those combinations, is basically understandable.

Quality, quality, quantity first, quantitative change caused qualitative change, the premise is that these "quantity" itself is high "quality". Therefore, I will choose to protect the "quality", that is, to ensure that the practice of each code, and the code composed of the "quality" of the algorithm, as for the "quantity", it is "Mickle", the result is.

3. Have you learned the C language, you divide the array pointer, pointer array, function pointer, pointer function these concepts?

Array pointer: is a pointer to an array that the pointer is pointing to

Pointer array: An array in which the elements in the array are pointers

Function pointer: is a pointer to the function that the pointer is pointing to

Pointer function: is a function, the return value of a function is a pointer

4. Have you learned the C language, do you understand the differences and connections between files and streams? How do I differentiate between text files and binaries? How do I programmatically manipulate these two files?

"Programming language Design" in the class is simply to say a little bit of paper, and did not say "flow" concept, so their differences I do not know.

Text files: File contents are stored in ASCII code files

Binary files: File contents are stored in binary file

When doing the file operation, at the file Operation command, there is ' B ' representing the operation of the binary file, otherwise it is the operation of the text file. such as "WB", "RB" is the former, "W", "R" is the latter.

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

Personal understanding, the process is to solve the problem when the focus on the solution of each step, according to the steps to design the program.

6. What is a module in C language? Have you ever written a program for multiple source files?

The specific definition of "module" cannot remember, in my own understanding, the "module" is a collection of code, functions, and other program components, the value of which is used to implement certain functions, and can be used directly after encapsulation.

I have not written more than one source file program, after all, is the beginner stage, the multi-source file program is still a bit complicated.

7. Have you learned the C language, do you know what is "high cohesion, low coupling"? How does this principle apply to high-quality programming?

"High cohesion, low coupling" This really does not know, the encyclopedia explanation is like this:
What is "high cohesion, low coupling"?

The second question, after I have read the explanation half-ignorant and half, my understanding is: Before the design process, should be to realize the function of the program to understand thoroughly, do a careful module division, to ensure that each module division of labor Clear, not cross, the communication between the modules can only one-way and does not constitute a loop and make the program jumbled.

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? How do I sort an integer array a (small to large, from large to small)? Write the appropriate program.

The program code is as follows

#include <stdio.h> #include <stdlib.h> #define N 80int Main () {int n,i=0,a[n],b[n],flag=0,temp,j;    printf ("Please input the number of data in array A (No more than numbers):");    scanf ("%d", &n);        for (; i<n;i++) {printf ("Please input no.%2d number:", i+1);        scanf ("%d", &a[i]);        b[i]=a[i];//in the loop, this row will copy the elements of array A into array b if (a[i]==5) {flag++;    }} printf ("Array B:");    for (i=0;i<n;i++) {printf ("%d", b[i]);    } printf ("\ n");    if (!flag) {printf ("There is no number ' 5 ' in the array.\n"); } else {printf ("There is number ' 5 ' in the array.    The number of it is%d\n ", flag);    The}//flag variable is used to determine if there are 5 printf ("Array in ascending order:"); for (i=0;i<n;i++) {for (j=i+1;j<n;j++) {if (A[i]>a[j]) {tem                P=a[i];                A[I]=A[J];            A[j]=temp;  }} printf ("%d", a[i]);  } printf ("\narray in descending order:"); for (i=0;i<n;i++) {for (j=i+1;j<n;j++) {if (A[i]<a[j]) {tem                P=a[i];                A[I]=A[J];            A[j]=temp;    }} printf ("%d", a[i]); }//sort by using bubble sort return 0;}

9. Write a program that counts how many lines of code your C language has written.

To tell the truth, I don't even have a clue about this problem. As I understand it, this topic requires me to convert the code in the. c file into text, and I have to find a condition that executes the "line number +1" program. On the internet I have found a blog is to explain the practice, but ... Still can not understand Ah!

10. Do you know what a breakpoint is? Give an example of your own debug program

Breakpoints are used to monitor variable changes. In the Codeblock environment, the red dot on the left side of the code is the breakpoint.

The ability is general, the level is limited, these 10 questions I also is a realistic answer. All I know is in my own words, I do not know the first statement, and then post the link. Study is like this, do not understand to ask, do not understand on the search!

Three

The following is an individual question according to the title of the PPT:

What are the characteristics of 1.JAVA language? What is the difference from C language?

2. Are there any special data types in the Java language compared to the C language? What is the special point of the array representation and use of Java?

What are the format requirements for the program expression in 3.JAVA language?

4. What is a "class"? How does the idea of "class" reflect "Java is an object-oriented programming language"?

5. What is the relationship between "subclass" and "class"? Is it an "inheritance" relationship?

6. What does "interface" mean to "implement"?

7. What is the "internal" category? Where is the "Exception" Class "Exception"?

8. What are the "practical" categories?

9. What components will be introduced? What is the "matter" to deal with?

10. What is "flow"?

11. What are the actions?

12. What is a "thread"? How is the "multithreading mechanism" embodied?

13. How is "network programming" implemented?

How does 14.JAVA handle this data?

15. Where is the content of this module mainly used?

The realization of "do high school", the core operation is "do", but the core is "learning", if only the machinery to do see the content without their own experience, so the effect will be very bad. So, my goal in Java class is not only to meet the curriculum requirements of this course, but also to develop an effective way to learn the language of the program, which helps to learn other languages.

20165111 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.