当前位置:网站首页>C中的数据存储
C中的数据存储
2022-08-03 19:27:00 【Naunyang】
这样一个现象:
一个函数的返回值是int16类型的。但当返回的参数值大于32767的时候是如何的现象。可以正常返回,接收返回值的变量可以容纳返回值即可。
如下边程序:
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
int16_t get_parameter_value(int a,int b)
{
return a+b;
}
int main()
{
uint16_t value = 0;
value = get_parameter_value(0xA801,1);
printf("value = %d\n",value);
printf("value = %x\n",value);
printf("Hello world!\n");
return 0;
}
边栏推荐
猜你喜欢

开源教育论坛| ChinaOSC

基础软件与开发语言开源论坛| ChinaOSC

余弦距离介绍

Shell programming loop statement

LOL英雄联盟卡顿掉帧问题解决办法 2022年8月1日

Kettle 读取 Excel 数据输出到 Oracle 详解

Handler 源码解析

2022年最新的Android面试大厂必考174题(附带详细答案)

Zhong Hua, senior architect of Ali: China-Taiwan strategic thinking and architecture practice; including internal implementation manual

Jingdong cloud released a new generation of distributed database StarDB 5.0
随机推荐
LeetCode 952. 按公因数计算最大组件大小
ScrollView嵌套RV,滑动有阻力不顺滑怎么办?
分享即时通讯开发之WebSocket:概念、原理、易错常识、动手实践
Radondb mysql installation problems
Unity获取canvas 下ui 在屏幕中的实际坐标
钱江摩托某型号产品ECU货不对版 消费者知情权应如何保障?
友宏医疗与Actxa签署Pre-M Diabetes TM 战略合作协议
ERROR: You don‘t have the SNMP perl module installed.
ADS 2023 下载链接
「游戏建模干货」建模大师几步操作,学习经典,赶紧脑补一下吧
FreeRTOS中级篇
Climbing Stairs (7/30)
LOL英雄联盟卡顿掉帧问题解决办法 2022年8月1日
Postgresql源码(64)查询执行——子模块Executor(2)执行前的数据结构和执行过程
CentOS 7 安装mysql
The ecological environmental protection management system based on mobile GIS
盘点在线帮助中心对企业能够起到的作用
Handler source code analysis
Postgresql source code (65) analysis of the working principle of the new snapshot system Globalvis
系统太多,多账号互通如何实现?