Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

C stdlib (stdlib.h) 库


C stdlib 函数

The <stdlib.h> 头文件 (standard library) 提供了各种常用的函数。

函数 描述
abs() 返回一个整数的绝对值(正值)
atof() 从数字的字符串表示中返回一个 double
atoi() 从一个整数的字符串表示中返回一个 int
atol() 从一个整数的字符串表示中返回一个 long int
atoll() 从一个整数的字符串表示中返回一个 long long int
calloc() 分配动态内存并用零填充
div() 返回整数除法的商和余数
exit() 结束程序
free() 释放动态内存
malloc() 分配动态内存
qsort() 对数组的内容进行排序
rand() 生成一个随机整数
realloc() 重新分配动态内存
srand() 初始化随机数生成器


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.