

Class is Starting!
Academic Snail C Language





Student Union of USTC

Q&A
Question
What are the basic requirements for the C language course? What advanced content do you recommend for deeper learning?
Answer
Although the exam outline changes every year, the basic course requirements are the learning content from this semester:
Mainly including basic concepts (operators, variables, common syntax, data types, etc.), sorting and searching of data, pointers, strings, arrays, linked lists, and file read and write operations.
Advanced content of the course:
This part is of course useful knowledge for writing code. If you have the capacity, you can learn how to set up the language environment (setting up the environment is very important for using common languages like Python, Java, etc.), and you can also learn about writing graphical interfaces in C language.
In addition, I think it is also very important to learn the规范写法 of code, because the code we write needs to be communicated with others, and sometimes several people need to write a piece of code together, so the规范性 of the code is very important. If you want to learn more about C language, you can study C++, which expands on C language and introduces more concepts; in other words, C language is a subset of C++.
Question
How to learn C language well?
Answer
The first step is to master the basic concepts and basic syntax. Taking pointers as an example, when learning about pointers, you first need to understand what a pointer is. A pointer is essentially a memory address, and a pointer variable is a variable used to represent a memory address. Like other variables, it can be declared or assigned a value. Only by understanding what a pointer is can you avoid confusion when learning related knowledge about pointers. This step of mastering concepts seems simple, but many students often neglect the concepts and jump straight to learning syntax, which will only lead to inefficiency and wasted effort.
The second step is to master syntax. Many concepts in C language, unlike conclusions in mathematics, cannot be derived by oneself. It is a “language rule” that cannot be derived but must be memorized. If you do not know how to define or declare a pointer variable, or what syntax to use to assign or access a pointer, then no matter how deep your understanding of pointers is, you cannot write a runnable piece of code. Therefore, for beginners in C language, it is essential to memorize and practice the basic syntax of relevant functions. This is the foundation for us to write code.
The third step is to understand the relationships between concepts, which is also a part that confuses many students when they first learn C language. After learning concepts such as functions, arrays, pointers, and strings, you will find that they are not isolated but interconnected. For instance, pointer arrays, functions that pass pointers, pointers to arrays, and the relationship between multi-dimensional arrays and pointers, etc. The connections and transformations between these concepts can easily confuse people, so it is important to carefully understand the logic and content of the corresponding code from the concepts, rather than just memorizing some conclusions. Otherwise, when faced with some transformed or more complex code in exams, you may be caught off guard.
The last step is to master common algorithms. In this semester’s course, we will learn a lot of algorithms, some of which are designed to help you better understand the content of the class, such as calculating classic mathematical problems. Others are often the foundation for implementing certain functions. For example, establishing and inserting linked lists, creating, reading, writing, and saving files are the basic functionalities of our computer, and are often required in exams.
Question
What should you pay attention to when writing code?
Answer
When writing code, I think the most important thing to pay attention to is some small details, such as whether your commas are in Chinese state. I have personally encountered a similar situation, checking the code for about two or three hours, only to find it was due to a misplaced comma.
Also, when writing code, you should think ahead about the logical relationships of the code; you cannot just write wherever you think of it, as this often leads to many problems and makes adjustments difficult.
Additionally, here’s a debugging tip: when debugging, you can first verify if the first iteration of your loop is executed according to the logic you want; generally, you will also check the execution result of the second value, which can help you quickly narrow down the debugging range.
Another tip is that when there is a problem with the function you wrote, you can use the printf() function to display the input and output of the function first. This will help you determine whether the problem occurred before the function or during its execution. Then, you can use printf() to output the values at the problematic places, allowing you to see what is different from what you expected, so you can make more targeted changes.
Question
Do you have any experience to share regarding exam preparation?
Answer
One thing to note is that in previous years, exams often tested some knowledge points that are usually overlooked, such as operator precedence, so everyone must review comprehensively and not skip topics just because they seem irrelevant.
Moreover, reviewing C language is relatively monotonous. You just need to diligently review the relevant content taught by the teacher, understand the logic of the relevant algorithms, and master common operations, which is generally sufficient. As for review materials, textbooks and assignments are usually enough to meet most review requirements. Of course, in the period leading up to the exam, it’s a good idea to practice some past final exams to identify gaps and improve your skills, especially since the exam will require handwritten code. If you are used to debugging with software and writing code while looking at books, it’s best to practice more in advance.

· USTC ·
The suggestions in this article come from
Teacher Bai Xuefei, Senior Li Mengxiang, Senior Yin Hao
Sincere thanks to all the teachers and seniors for their enthusiastic replies and experience sharing.
The article is reproduced from the Student Union of the University of Science and Technology of China
Scan the QR code to follow
the official platforms of undergraduate admissions at USTC,
to learn more about the latest information
You can also consult through messages, private messages, or comments

WeChat Official Account

WeChat Video Account

Sina Weibo

Bilibili

Douyin Video

Kuaishou Video
Recommended Reading

Like! Four students from our school’s first Sino-French Mathematics Talent Class were admitted to the Paris Institute of Technology

Advice for Freshmen Learning Linear Algebra

“Top Ten Advances in Physics” Announced, USTC’s Quantum Computing Superiority Experiment Selected!

Major Breakthroughs in Chinese Science and Technology in 2021, Three Achievements from USTC Selected!

USTC Cat Version Enrollment Guide?!
