当前位置:网站首页>Program compilation and debugging learning record
Program compilation and debugging learning record
2022-04-23 13:59:00 【Li Xingye】
One 、gcc compiler
gcc(CNU Compiler) yes CNU Platform compiler , Can be C、C++ Compile and link the source program into an executable file , Support suffix :
- .c: C Language source code
- .h: The header file contained in the program
- .i It's pretreated C Source code file
- .s Assembly language code file
- .o Compiled object file
gcc -o hello hello.c
- -o Output the executable
- -c Only require the compiler to output object code (.o file ), Without outputting the executable
- -g For debugging
- ./hello View output
- -Wall Check Show more warnings
Let's fight
Use vi Write a 123*…*100 The program , And use gcc compile
Let's look at the picture editor .

result :

Two 、 Program debugging


3、 ... and 、C Language foundation
A program should consist of two parts
- A description of the data : Formulate the type of data and the organization form of data in the program , Data structure
- A description of the operation : Operation steps , That is algorithm

The best programming state : - 1、 Rational thinking , You can make a flow chart
- 2、 Start editing the code
Let's fight :
Judge whether the year entered by the user is a leap year
-
1、 Ideas , flow chart
-
To judge whether a year is a leap year, two conditions need to be met at the same time
(1) It can be 4 to be divisible by , Can not be 100 to be divisible by
(2) It can be 400 to be divisible by

-
2、 Code



Four 、 summary
1、 The code cannot be pasted and needs to be solved !
2、 Think slowly 、 Sort out a program , It's still very good
3、 My ability cannot be qualitatively improved in a short time , If so, it's the result of accumulation , So take your time , It's better to be down-to-earth .
版权声明
本文为[Li Xingye]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231358379390.html
边栏推荐
- What is the difference between blue-green publishing, rolling publishing and gray publishing?
- Neuron and neural network
- Choreographer full resolution
- cnpm的诡异bug
- try --finally
- Quartus prime hardware experimental development (de2-115 board) experiment II function adjustable comprehensive timer design
- [VMware] address of VMware Tools
- Record a strange bug: component copy after cache component jump
- Quartus Prime硬件实验开发(DE2-115板)实验一CPU指令运算器设计
- UML Unified Modeling Language
猜你喜欢

Business case | how to promote the activity of sports and health app users? It is enough to do these points well

Technologie zéro copie

Apache Atlas Compilation and installation records

Dolphin scheduler integrates Flink task pit records

Leetcode | 38 appearance array

scikit-learn构建模型的万能模板

第一章 电商秒杀商品回顾

程序编译调试学习记录

联想产品经理林林:天津当地网络运营商网络故障 ZUI系统后台服务器暂时无法正常工作

Un modèle universel pour la construction d'un modèle d'apprentissage scikit
随机推荐
Es introduction learning notes
China creates vast research infrastructure to support ambitious climate goals
Express ② (routage)
UML Unified Modeling Language
JS 力扣刷题 102. 二叉树的层序遍历
Decentralized Collaborative Learning Framework for Next POI Recommendation
Detailed explanation of redis (Basic + data type + transaction + persistence + publish and subscribe + master-slave replication + sentinel + cache penetration, breakdown and avalanche)
MySQL [read / write lock + table lock + row lock + mvcc]
基础知识学习记录
Three characteristics of volatile keyword [data visibility, prohibition of instruction rearrangement and no guarantee of operation atomicity]
L2-024 tribe (25 points)
Analysis of the problem that the cluster component GIPC in RAC environment cannot correctly identify the heartbeat network state
蓝绿发布、滚动发布、灰度发布,有什么区别?
Influence of openssh version on SSH mutual trust creation in RAC environment
JS force deduction brush question 103 Zigzag sequence traversal of binary tree
crontab定时任务输出产生大量邮件耗尽文件系统inode问题处理
Un modèle universel pour la construction d'un modèle d'apprentissage scikit
Express②(路由)
Kettle--控件解析
[code analysis (2)] communication efficient learning of deep networks from decentralized data