Re-learning C language - basic learning summary 1 (first week - second week)

Introduction to the basics of the first lesson
  1. Summary description: It mainly tells us the relationship between programming language and computer; C language development history, application scope, and proportion in all programming language applications; basic structure of C language source documents; online C language development environment;
  2. Detailed review:
    1. Programming language can be compiled and executed, or interpreted and executed, and the computer will only execute according to the written logic step by step
    2. Computers do not execute the source code of the programming language and need to be converted into a coded form that the computer understands
    3. The C language is now generally applicable to the C99 standard
    4. The proportion of C language in all programming languages ​​has been maintained at about 16%, which is very stable. Some hardware development must apply C language
    5. The specification of the C language is retained by most modern high-level languages, but the form is different
    6. We can use Dev C++ as our lightweight IDE environment for developing C language programs, or use the online development environment for development and debugging
    7. Basic C language source code:
      #include "stdio.h"
      
      int main() {
          // 这里写程序
          return 0;
      }
      
Lesson 2 Basic Calculation
  1. Summary description: It mainly introduces the knowledge related to C language computing, including digital data types, operators, expressions, and also introduces the precautions for brushing questions. The additional site pintia.cn
  2. Detailed review:
    1. The data type is divided into integer type int, floating point double precision double, floating point single precision float
    2. When using C language calculation, you need to pay special attention to the actual situation of the calculation result. If it is a floating-point number (decimal), you need to declare the floating-point number in advance or use the floating-point number (decimal) for calculation, otherwise it will produce a calculation result that only retains integer bits, such as 1/2==0, 2/2==1, 3/2==1this kind of result
    3. scanf(), receive floating point number, the placeholder symbol is %lf, printf(), the floating point number placeholder is%f
    4. scanf() can receive multiple inputs; for example, scanf("%d %d", &a, &b), this form of identification can accept two characters. During the receiving process, the user needs to input strictly according to the format before the comma, and enter first An integer, then a space, and then enter the next integer, and the input of multiple data is analogous to the writing and input.
    5. The naming rules of variables, the combination of characters that do not start with numbers, numbers, and underscores, avoid using reserved characters in C language
    6. The precedence of operators needs special attention to prevent calculation errors

Guess you like

Origin blog.csdn.net/qinmin1/article/details/103996706