当前位置:网站首页>C language -- 1 c language cognition
C language -- 1 c language cognition
2022-06-10 21:29:00 【Try!】
Recent preparation and improvement C Language learning , Consolidate foundation .
1、c The content of language learning
- Understand what is c Language
- data type
- Variable 、 Constant
- character string 、 Escape character 、 notes
- Select statement
- Loop statement
- function
- Array
- The operator
- Common keywords
- define Define constants and macros
- The pointer
- Structure
2、 What is? c Language
Language : People communicate with people
Computer language : The language in which people communicate with computers , Such as :c、c++、JAVA etc.
c Language is a general computer programming language , Widely used in underlying development ( namely : Write operating system 、 Drive, etc ).C The design goal of the language is to provide a way to compile 、 Processing low-level memory , Generate a small amount of machine code and a programming language that can run without any running environment support .
C Language has international standards , Such as :c89,c90,c99,c11, Mainly c89 And c90.
3、 How to write c What about the language code ?
Write through the compiler , Its compiler mainly includes :Clang,GCC,WIN-TC,SUBLIME,MSVC,Turbo C etc. . This study is going to use microsoft visual studio 2022, It's the integrated development environment , Integrated MSVC Such a compiler , You can write and compile c The language code .
Write c Procedure steps :
Create a project

Create a source file

Write code , Write a simple one first , Print “c Language learning ”, Write the main function (main function ) And the body of the function
{
return 0;// This part is the body of the function
}
#include<stdio.h>
int main() //int Is the type returned by the function ,main() Is the function name
{
printf("c Language learning ");
return 0;
}
- Compile code + Run code
On the menu bar — debugging — Start execution without debugging ;
Shortcut key fn+ctrl+f5
Shortcut key ctrl+f5
4、 How to execute c Code ?
c The language is executed from the first line of the main function , therefore c Language code lines must have main function ,main Function is an entry , Otherwise, you can't execute .
printf It's a library function , To print information on a screen ,printf The use of is required in advance “ Say hello ” Of , namely : Is to include the header file ,
#include <stdio.h>Set item properties : Stop “ project ” name — Right click “ attribute ”—“ The linker ”—“ System ”—“ Subsystem ” Change the back to “ Console …”

Be careful : There can be multiple in a project .c file , But these multiple .c The file has and can only have one main function
边栏推荐
- 软件测试工程师是做什么的?
- Brute force method / task assignment
- Shell implements SSH login and executes commands
- LeetCode 进阶之路 - 加一
- What is the difference between localhost and 127.0.0.1?
- Read the source code of micropyton - add the C extension class module (4)
- Test APK exception control netlocation attacker development
- Redis集群配置
- 20192407 2021-2022-2 experimental report on Experiment 8 of network and system attack and Defense Technology
- Leetcode advanced path - reverse string
猜你喜欢

^30H5 Web Worker多线程

初中毕业生,选择中职学校也可以升入高等学府
![[generation confrontation network learning part I] classic Gan and its existing problems and related improvements](/img/5a/0a4015cd4dcc21afd16ca7f895d909.png)
[generation confrontation network learning part I] classic Gan and its existing problems and related improvements

Cas de test app

入行须知:运维需要懂编程吗?

Understanding deep learning attention

synergy: server refused client with our name

Quick start to VISSIM simulation

Will your company choose to develop data center?

Theoretical basis of distributed services
随机推荐
LeetCode 进阶之路 - 69.X的平方根
入行须知:运维需要懂编程吗?
Extracting Nalu unit data from H264 real-time stream
shell实现ssh登录并执行命令
Realize OSD reverse color on YUV image according to background color
数据库系统概论 ---- 第一章 -- 绪论(重要知识点)
Redis集群配置
【无标题】破目
蛮力法/1~n的幂集 v4 递归
Interview Essentials - basic knowledge of synchronized underlying principles
面试必备——synchronized底层原理的基础知识
Electronic bidding procurement mall system: optimize traditional procurement business and speed up enterprise digital upgrading
防抖和节流
Meetup预告:Linkis新版本介绍以及DSS的应用实践
游戏兼容性测试(通用方案)
Signal and system review 1
leetcode 划分数组使最大差为 K
Fast Planner - detailed explanation of kinetic astar
The programmed navigation route jumps to the current route (the parameters remain unchanged), and the navigationduplicated warning error will be thrown if it is executed multiple times?
Understanding deep learning attention