C Language Learning Summary

Source: Internet
Author: User
Recently, the company assigned a task to conduct research on PG for the next stage of Platform 3.0 R & D. In fact, PG porting has been Algorithm The Department is responsible, but PG's task after transplantation is responsible for the underlying data storage, transaction processing, and data mining of the entire platform software, so we simply took this quickly to the platform department. This is because the rcp I am responsible for has basically come to an end in terms of functionality. At present, it is mainly to bring new people and provide some guidance on the framework, for me, learning C language has two advantages: 1. C and data structure are required for the examination; 2. learning C language can help me understand Program In the execution process, you can better understand the underlying structure of the computer.

In the last two weeksCodeI have a better understanding of C and the underlying system. As far as the process is concerned, I didn't understand it at all. I only knew that a process is required to run the program and contain those things for the process, the resources required to create a process are undefined. After reading the PG code through the Internet and books, I have a better understanding of the process.

The most difficult part of C language learning is the pointer. Almost every C language learner is confused about how to handle the pointer problem. To really understand the C program, you must know what the Pointer Points? It refers to a specific value, a memory address, an array, or a function. Because pointers are unsafe, you must have a clear understanding of the memory structure during development. Otherwise, a stack overflow error may occur. To sum up, let's take a look at the Learning Experience. When we look at it again, we also have a prompt: when reading the pointer, we never start to define an identifier. When we encounter an extension, this is repeated, until the definition ends.

In a multi-process program such as PG, how does one communicate between processes? We all know that thread communication can be implemented using mutex locks. How can process communication be implemented? In PG, we use the shared memory method (I don't know if there are other methods) to create a memory Virtual File image ing table in the main process, each sub-process determines whether to access the shared memory by synchronizing the semaphores to implement inter-process communication.

String processing in C language is a big problem for me, in advancedProgramming Language(C #, Java) I can easily use stringbuilder or string. format () and other methods to achieve String concatenation, and C uses pointers even when dealing with such a small String concatenation problem, which is quite a headache.

the only difference is that after more than N days of effort, finally, PG is run and can be debugged.

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.