当前位置:网站首页>[C language] what is a function? Classification and emphasis of functions (help you quickly classify and remember functions)
[C language] what is a function? Classification and emphasis of functions (help you quickly classify and remember functions)
2022-07-23 11:19:00 【rookieﻬ°】
List of articles
One : What is a function ?
We often see the concept of function in Mathematics , But you know C Functions in language ?
Wikipedia definition of function : Subroutines
- In computer science , Subroutines ( English :subroutine、procedure、function、routine、method、subprogram、callable uint), It's a piece of code in a large program , Consists of one or more statement blocks . It is responsible for completing a specific task , And compared to other code , With relative independence .
- Generally, there are input parameters and return values , Provide encapsulation of the process and hiding of details . These codes are often referred to as software libraries .
Two :C Classification of functions in language ?
1. Library function
1.1 Why are there library functions ?
Such as scanf、printf、strlen Wait, we all often use , Functions implemented by compiler manufacturers that play a certain function , Called library functions . And such as ,VS The library function of is provided by Microsoft ,gcc Library functions for are gcc Official supply ,clang The library function of is provided by apple, etc . All in all , Library functions we will often use , To avoid unnecessary trouble , Provided by the manufacturer , The function we use is called library function .
1.2 Classification of library functions ?
Classification of functions , A brief summary ,C The library functions commonly used in language are :
- IO function
- String manipulation functions
- Character manipulation functions
- Memory manipulation function
- Time / Date operation function
- Mathematical functions
- Other library functions
1.3 How to learn to use library functions ?
Do you need to remember all the library functions ? The answer is :No!
This is the age of the Internet , We just need to have an impression , I know this function in my mind , Then you can query and use . Now I recommend some tools for querying library functions :
- MSDN(Microsoft Developer Network), This is a library function query software used by an internal employee of Microsoft .
- cpp research Website ( recommend , Very easy to use , Friends with poor English can download a translation plug-in )
- http://en.cppreference.com( English version )
- http://ch.cppreference.com( Chinese version )
Tips: English is very important , You should at least barely understand the literature .
2. Custom function
If the library function can do anything , What else should programmers do ?
therefore , For us , More importantly, custom functions , We can also define functions in library functions . Custom functions are the same as library functions , There's a function name , Return type , Function parameter . The difference is that this is designed by us , This gives us a lot of room to play , Have you figured out how to do your own function ?
I think , friend , You don't want to go whoring for nothing ?
边栏推荐
- The attribution of branch and loop statements in C language
- gbk编解码器无法解码的问题,有可能出题出在文件名上
- [监控部署实操]基于granfana展示Prometheus的图表和loki+promtail的图表
- 忽略埋点记录的ResizeObserver - loop limit exceeded
- Flask blueprint
- [untitled]
- Request data acquisition and response
- Send SMS verification code synchronously
- Pyspark learning notes
- 【无标题】
猜你喜欢

【uiautomation】键指令大全(以及三种调用方式)+常用鼠标动作+SendKeys+Inspect学习
![[Hudi]hudi的编译及hudi&spark和hudi&flink的简单使用](/img/6f/e6f5ef79c232d9b27a8334cd8ddaa5.png)
[Hudi]hudi的编译及hudi&spark和hudi&flink的简单使用

pyspark学习笔记

JDBC database connection pool

The attribution of branch and loop statements in C language

Copy a project /project in idea
![[pytho-flask筆記5]藍圖簡單使用](/img/0a/00b259f42e2fa83d4871263cc5f184.png)
[pytho-flask筆記5]藍圖簡單使用
[email protected] ‘] failed with code 1"/>NPM init vite app < project name > error install for[‘ [email protected] ‘] failed with code 1
![[flink]flink on yarn之flink-conf最简单配置](/img/de/0ec23f3379148dba27fe77dc51e22f.png)
[flink]flink on yarn之flink-conf最简单配置
D2DEngine食用教程(1)———最简单的程序
随机推荐
通用视图,序列化器
Fun code rain, share it online~-
【无标题】
Keras saves the best model in the training process
对NLP中transformer里面decoder的理解
[监控部署实操]基于granfana展示Prometheus的图表和loki+promtail的图表
uni-app小程序中v-show与display:flex一起使用时v-show不生效!
BurpSuite学习笔记
机器学习零散笔记:一些概念和注意
General view, serializer
Keras保存训练过程中的最好模型
[部署]presto-server-0.261.tar.gz的集群部署和启动
How to merge the website content with video and audio separated? How to write batch download code?
[untitled]
Anti shake and throttling of JS
Understanding of closures of JS
构造函数,原型链,instanceOf
[Hudi]hudi的编译及hudi&spark和hudi&flink的简单使用
【Pyautogui学习】屏幕坐标、鼠标滚动
Five methods to prevent over fitting of neural network