当前位置:网站首页>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
边栏推荐
- js 从一个数组对象中取key 和value组成一个新的对象
- Tidb DM alarm DM_ sync_ process_ exists_ with_ Error troubleshooting
- Laravel dompdf exports PDF, and the problem of Chinese garbled code is solved
- Login interface code
- Liste des liens (simple)
- 魅族新任董事長沈子瑜:創始人黃章先生將作為魅族科技產品戰略顧問
- JS takes key and value from an array object to form a new object
- Etcd database source code analysis -- rawnode simple package
- [cloud resources] what software is good for cloud resource security management? Why?
- ::ffff:192.168.31.101 是一个什么地址?
猜你喜欢

牛客网:拦截导弹
Jetpack compose introduction to mastery

如何将 DevSecOps 引入企业?

SAS接口有什么优势特点

Rk3566 add LED

uplad_ Labs first three levels

Those things I didn't know until I took the postgraduate entrance examination

金融壹賬通香港上市:市值63億港元 葉望春稱守正篤實,久久為功

昆仑太科冲刺科创板:年营收1.3亿拟募资5亿 电科太极持股40%

What is the future development trend of neural network Internet of things
随机推荐
Can graduate students not learn English? As long as the score of postgraduate entrance examination English or CET-6 is high!
Laravel dompdf exports PDF, and the problem of Chinese garbled code is solved
金融壹账通香港上市:市值63亿港元 叶望春称守正笃实,久久为功
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
VC开发非MFC程序内存泄漏跟踪代码
[buuctf.reverse] 152-154
R语言使用MASS包的polr函数构建有序多分类logistic回归模型、使用coef函数获取模型中每个变量(自变量改变一个单位)对应的对数优势比(log odds ratio)
03_Solr之dataimport
Requests + BS4 crawl Douban top250 movie information
Kotlin collaboration uses coroutinecontext to implement the retry logic after a network request fails
Source code analysis of etcd database -- peer RT of inter cluster network layer client
登录界面代码
[buuctf.reverse] 152-154
根据CronSequenceGenerator计算cron表达式的时间
LeetCode_69(x 的平方根 )
Hide Chinese name
Ueditor + PHP enables Alibaba cloud OSS upload
Wechat app payment callback processing method PHP logging method, notes. 2020/5/26
2022 driller (drilling) examination question bank and simulation examination
魅族新任董事長沈子瑜:創始人黃章先生將作為魅族科技產品戰略顧問