当前位置:网站首页>Discussion on memset assignment
Discussion on memset assignment
2022-07-05 14:09:00 【Crayon gold QAQ】
memset assignment
As far as possible with 0x3f3f3f3f assignment , such memset Assignment result and “=” The effect of assignment number is the same , There will be no mismatches .
0x7fffffff Empathy (7 individual f)
This is the running code
You can see that for memset, These four methods are equivalent .
#include <bits/stdc++.h>
using namespace std;
int a[100];
int main()
{
memset(a, 0x3f, sizeof(a));
cout << a[0] << endl;
memset(a, 0x3f3f, sizeof(a));
cout << a[0] << endl;
memset(a, 0x3f3f3f, sizeof(a));
cout << a[0] << endl;
memset(a, 0x3f3f3f3f, sizeof(a));
cout << a[0] << endl;
cout << 0x3f << endl;
cout << 0x3f3f << endl;
cout << 0x3f3f3f << endl;
cout << 0x3f3f3f3f << endl;
return 0;
}
Running results :
1061109567
1061109567
1061109567
1061109567
63
16191
4144959
1061109567
边栏推荐
- Convolutional Neural Networks简述
- What is the ranking of GF futures? Is it safe and reliable to open an account for GF futures online?
- Embedded software architecture design - message interaction
- Login interface code
- 鏈錶(簡單)
- Matlab learning 2022.7.4
- 金融壹账通香港上市:市值63亿港元 叶望春称守正笃实,久久为功
- What is the future development trend of neural network Internet of things
- 几款分布式数据库的对比
- 基于 TiDB 场景式技术架构过程 - 理论篇
猜你喜欢

SAS接口有什么优势特点

物联网应用技术专业是属于什么类
![[cloud resources] what software is good for cloud resource security management? Why?](/img/c2/85d6b4a956afc99c2dc195a1ac3938.png)
[cloud resources] what software is good for cloud resource security management? Why?

软件测试人在深圳有哪些值得去的互联网公司【软件测试人员专供版】

国富氢能冲刺科创板:拟募资20亿 应收账款3.6亿超营收

Attack and defense world crypto WP

Ordering system based on wechat applet

为什么我认识的机械工程师都抱怨工资低?

常见问题之PHP——Fatal error: Allowed memory size of 314572800 bytes exhausted...

Elfk deployment
随机推荐
TiFlash 源码解读(四) | TiFlash DDL 模块设计及实现分析
[buuctf.reverse] 152-154
最简单不用证书也可以多开功能的方式
Zibll theme external chain redirection go page beautification tutorial
Requset + BS4 crawling shell listings
Requests + BS4 crawl Douban top250 movie information
神经网络物联网未来发展趋势怎么样
Request + BS4 crawl Netease cloud music popular comments
Source code analysis of etcd database -- peer RT of inter cluster network layer client
蓝桥杯学习2022.7.5(上午)
关于memset赋值的探讨
Fault analysis | analysis of an example of MySQL running out of host memory
昆仑太科冲刺科创板:年营收1.3亿拟募资5亿 电科太极持股40%
LeetCode_2(两数相加)
2022 machine fitter (Advanced) test question simulation test question bank simulation test platform operation
TDengine 社区问题双周精选 | 第三期
[machine learning notes] how to solve over fitting and under fitting
C - Divisors of the Divisors of An Integer Gym - 102040C
明峰医疗冲刺科创板:年营收3.5亿元 拟募资6.24亿
Financial one account Hong Kong listed: market value of 6.3 billion HK $Ye wangchun said to be Keeping true and true, long - term work