1536 views|0 replies

25

Posts

0

Resources
The OP
 

Some suggestions for learning C language [Copy link]

 Friends who are new to C language should first understand the key core concepts of C language (structuring, three execution processes, priority, pointers, files, unions, functions, scopes, overloading, etc.). Only by understanding these can you grasp the essence of C language in future learning. These concepts are like logical lines, running through the entire C language system, giving people a "structured" thought system. Let me briefly talk about these core concepts. 1. From a macro perspective, structuring is the programming thought foundation of C language, that is, each functional module of C language is a structure, and each structure implements an operation or an algorithm. This structure is represented by curly braces "{}", and the algorithm is inside the curly braces. Pay special attention to where the curly braces "}" are enclosed, which determines where the algorithm function ends. These are common mistakes made by beginners, who often get the end point of the algorithm function wrong. 2. The three execution processes are sequential process, conditional process, and loop process. The three processes are all common execution processes of computers and must be understood. Each algorithm is based on the execution order of these three processes. 3. Priority is the privilege of the algorithm to be prioritized when multiple functions are in parallel. If you do not pay attention to the order of priority, the algorithm will go wrong. These priorities must be remembered. 4. Pointers are an important feature of C language and the essence of speeding up operations. It is an operation on the data address, not on the data. 5. Files and unions are very simple concepts, so there is no need to say more. As the name suggests, files are the same as daily concepts. It is not too difficult for those who have learned data software to understand unions. 6. From a microscopic perspective, functions are the driving mechanism of C language, and all statements are implemented by function drivers. Remembering function commands and related configuration parameters can make good use of the advantages of C. Note that functions cannot be remembered incorrectly, otherwise you will get wrong results. If you can learn to debug, you will have a deeper understanding of the role of function functions. 7. Scope is like an expiration date, which means the role played from there to there, and it will not work beyond this (just like expired things are worthless). If you grasp the use of scope, you can clarify the relationship between functions and will not get lost in the huge function names. 8. Overloading is to facilitate users, using a mechanism similar to calling to reduce the writing time for users. Just like looking up a word in a dictionary, if you don't understand a word, you have to look it up in the dictionary (equivalent to calling other tools to achieve what you want to do), and looking up a dictionary is something you have already learned, so you can do it. It is not enough to learn C language in general. You need to simulate various principles in your mind and realize the operation of the computer C function in the human brain, so that you can grasp the steps of C from a macro perspective.


This post is from TI Technology Forum
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list