c - 为什么我可以在 C 中调用未定义的函数 sqrt()?
问题描述
嘿伙计们,我想知道为什么我的程序只是返回垃圾,我发现我没有包含 math.h。但是,如果函数没有任何定义,为什么代码还要编译和运行呢?
#include <stdio.h>
int main()
{
int ka = 0;
ka = sqrt(4);
printf("ha ist %d", ka);
system("PAUSE");
return 0;
}
解决方案
推荐阅读
- python - 失败的 test_main.py::test_login_success - tortoise.exceptions.ConfigurationError:没有与模型关联的数据库
- c# - 从多个文本框中获取文本
- javascript - 拖动元素时 div 样式消失
- security - 如何检测 Gitlab CI/CD 管道中任何提交的 XSS 漏洞?
- php - 使用 ftp_ssl_connect 连接到端口 22 时“无法连接到 ssl”
- reactjs - React Typescript 无法使用通用组件编译
- typescript - Mongoose - 无法访问 createdAt
- javascript - 我的 PUG 文件中没有读取我的 JavaScript 文件。知道为什么这不起作用吗?
- react-native - React Native:如何将弹出模式放入平面列表
- python - 分组后将具有值的行转换为多列