当前位置:网站首页>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
边栏推荐
- 第十五章 软件工程新技术
- RAC environment error reporting ora-00239: timeout waiting for control file enqueue troubleshooting
- How does redis solve the problems of cache avalanche, cache breakdown and cache penetration
- 大专的我,闭关苦学 56 天,含泪拿下阿里 offer,五轮面试,六个小时灵魂拷问
- 程序编译调试学习记录
- Jiannanchun understood the word game
- Quartus prime hardware experimental development (de2-115 board) experiment 1 CPU instruction calculator design
- UML统一建模语言
- Kettle--控件解析
- 记录一个奇怪的bug:缓存组件跳转之后出现组件复制
猜你喜欢

crontab定时任务输出产生大量邮件耗尽文件系统inode问题处理

Building MySQL environment under Ubuntu & getting to know SQL
![[VMware] address of VMware Tools](/img/0e/13f263bd69c8224f7c755258d94777.png)
[VMware] address of VMware Tools

记录一个奇怪的bug:缓存组件跳转之后出现组件复制

Multithreading

scikit-learn構建模型的萬能模板

零拷貝技術

ACFs file system creation, expansion, reduction and other configuration steps

How does redis solve the problems of cache avalanche, cache breakdown and cache penetration
![MySQL [read / write lock + table lock + row lock + mvcc]](/img/a9/ace85899a01a7d4fd80b2e631e44d6.png)
MySQL [read / write lock + table lock + row lock + mvcc]
随机推荐
Quartus Prime硬件实验开发(DE2-115板)实验一CPU指令运算器设计
Taobao released the baby prompt "your consumer protection deposit is insufficient, and the expiration protection has been started"
[VMware] address of VMware Tools
Processing of ASM network not automatically started in 19C
Elmo (bilstm-crf + Elmo) (conll-2003 named entity recognition NER)
JUC interview questions about synchronized, ThreadLocal, thread pool and atomic atomic classes
MySQL [read / write lock + table lock + row lock + mvcc]
Decentralized Collaborative Learning Framework for Next POI Recommendation
pycharm Install packages failed
L2-024 tribe (25 points)
Quartus Prime硬件实验开发(DE2-115板)实验二功能可调综合计时器设计
Choreographer full resolution
Express middleware ③ (custom Middleware)
【vmware】vmware tools 地址
基础知识学习记录
freeCodeCamp----time_ Calculator exercise
33 million IOPs, 39 microsecond delay, carbon footprint certification, who is serious?
JS force deduction brush question 102 Sequence traversal of binary tree
STM32学习记录0007——新建工程(基于寄存器版)
try --finally