当前位置:网站首页>程序编译调试学习记录
程序编译调试学习记录
2022-04-23 13:58:00 【li星野】
一、gcc编译器
gcc(CNU Compiler)是CNU推出的平台编译器,可将C、C++源程序编译链接成可执行文件,支持一下后缀:
- .c: C语言源代码
- .h:程序所包含的头文件
- .i 已经预处理过的C源代码文件
- .s 汇编语言代码文件
- .o 编译后的目标文件
gcc -o hello hello.c
- -o 输出可执行文件
- -c 只要求编译器输出目标代码(.o文件),而不输出可执行文件
- -g 用于调试
- ./hello 查看输出结果
- -Wall 检查 多显示一些警告
实战一下
使用vi 编写一个123*…*100的程序,并且使用gcc 编译
大家看着图片编辑吧。
结果:
二、程序调试
三、C语言基础
一个程序应当包含两个部分
- 对数据的描述:在程序当中制定数据的类型和数据的组织形式,也就是数据结构
- 对操作的描述:即操作步骤,也就是算法
最好的编程状态: - 1、先理思路,可以做流程图
- 2、开始编辑代码
实战一下:
判断用户输入的年份是不是闰年
-
1、思路,流程图
-
判断某一年是否为闰年需要同时满足两个条件
(1) 能够被4整除,不能被100整除
(2) 能够被400整除
-
2、代码
四、总结
1、代码不能粘贴需要解决!
2、慢慢的思考、梳理一个程序,还是非常不错的
3、我的能力不可能在短期之内的得到质的飞越,如果有那要是厚积薄发的结果,所以慢慢来,扎扎实实比较好。
版权声明
本文为[li星野]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_43441284/article/details/124339380
边栏推荐
- Spark入门基本操作
- Oracle RAC database instance startup exception analysis IPC send timeout
- 聯想拯救者Y9000X 2020
- 19c environment ora-01035 login error handling
- Technologie zéro copie
- Parameter comparison of several e-book readers
- The art of automation
- crontab定时任务输出产生大量邮件耗尽文件系统inode问题处理
- Detailed explanation of redis (Basic + data type + transaction + persistence + publish and subscribe + master-slave replication + sentinel + cache penetration, breakdown and avalanche)
- [code analysis (4)] communication efficient learning of deep networks from decentralized data
猜你喜欢
Question bank and answer analysis of the 2022 simulated examination of the latest eight members of Jiangxi construction (quality control)
Leetcode brush question 𞓜 13 Roman numeral to integer
Quartus Prime硬件实验开发(DE2-115板)实验二功能可调综合计时器设计
【报名】TF54:工程师成长地图与卓越研发组织打造
Apache Atlas Compilation and installation records
33 million IOPs, 39 microsecond delay, carbon footprint certification, who is serious?
Android 面试主题集合整理
Oracle告警日志alert.log和跟踪trace文件中文乱码显示
聯想拯救者Y9000X 2020
What is the difference between blue-green publishing, rolling publishing and gray publishing?
随机推荐
About me
【报名】TF54:工程师成长地图与卓越研发组织打造
AttributeError: ‘dict‘ object has no attribute ‘iteritems‘
Troubleshooting of expdp export error when Oracle table has logical bad blocks
项目中遇到的问题(五)操作Excel接口Poi的理解
Strange bug of cnpm
Basic SQL query and learning
解决方案架构师的小锦囊 - 架构图的 5 种类型
JUC interview questions about synchronized, ThreadLocal, thread pool and atomic atomic classes
RAC environment alert log error drop transient type: systp2jw0acnaurdgu1sbqmbryw = = troubleshooting
try --finally
Leetcode? The first common node of two linked lists
Android篇:2019初中级Android开发社招面试解答(中
Android: answers to the recruitment and interview of intermediate Android Development Agency in early 2019 (medium)
Decentralized Collaborative Learning Framework for Next POI Recommendation
Oracle database recovery data
Analysis of the problem that the cluster component GIPC in RAC environment cannot correctly identify the heartbeat network state
2022年江西最新建筑八大员(质量员)模拟考试题库及答案解析
Introduction to spark basic operation
Reading notes: Secure federated matrix factorization