当前位置:网站首页>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
边栏推荐
- Influence of openssh version on SSH mutual trust creation in RAC environment
- Dynamic subset division problem
- AtomicIntegerArray源码分析与感悟
- [code analysis (5)] communication efficient learning of deep networks from decentralized data
- JS force deduction brush question 102 Sequence traversal of binary tree
- 淘宝发布宝贝提示“您的消保保证金额度不足,已启动到期保障”
- RAC environment error reporting ora-00239: timeout waiting for control file enqueue troubleshooting
- SQL learning window function
- Analysis of the problem that the cluster component GIPC in RAC environment cannot correctly identify the heartbeat network state
- Kettle--控件解析
猜你喜欢
随机推荐
编程旅行之函数
剑南春把文字游戏玩明白了
OSS cloud storage management practice (polite experience)
第十五章 软件工程新技术
JS force deduction brush question 103 Zigzag sequence traversal of binary tree
STM32学习记录0007——新建工程(基于寄存器版)
Leetcode? The first common node of two linked lists
Oracle告警日志alert.log和跟踪trace文件中文乱码显示
PG SQL intercepts the string to the specified character position
Taobao released the baby prompt "your consumer protection deposit is insufficient, and the expiration protection has been started"
Port occupied 1
JS 烧脑面试题大赏
Analysis of cluster component gpnp failed to start successfully in RAC environment
VsCode-Go
Reading notes: meta matrix factorization for federated rating predictions
Analysis of redo log generated by select command
Un modèle universel pour la construction d'un modèle d'apprentissage scikit
Strange bug of cnpm
redis如何解决缓存雪崩、缓存击穿和缓存穿透问题
力扣刷题 101. 对称二叉树