当前位置:网站首页>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
边栏推荐
- In addition to the root directory, other routes of laravel + xampp are 404 solutions
- Laravel - view (new and output views)
- Tidb DM alarm DM_ sync_ process_ exists_ with_ Error troubleshooting
- matlab学习2022.7.4
- [buuctf.reverse] 152-154
- 广发期货排名多少?网上办理广发期货开户安全可靠吗?
- JS takes key and value from an array object to form a new object
- ::ffff:192.168.31.101 是一个什么地址?
- OSI and tcp/ip protocol cluster
- 别不服气。手机功能升级就是强
猜你喜欢
[South China University of technology] information sharing of postgraduate entrance examination and re examination
Zhizhen new energy rushes to the scientific innovation board: the annual revenue is 220million, and SAIC venture capital is the shareholder
Oneconnect listed in Hong Kong: with a market value of HK $6.3 billion, ye Wangchun said that he was honest and trustworthy, and long-term success
TDengine 社区问题双周精选 | 第三期
Tdengine biweekly selection of community issues | phase III
国富氢能冲刺科创板:拟募资20亿 应收账款3.6亿超营收
PHP basic syntax
Set up a website with a sense of ceremony, and post it to the public 2/2 through the intranet
物联网应用技术专业是属于什么类
Getting started with rce
随机推荐
[cloud resources] what software is good for cloud resource security management? Why?
01 、Solr7.3.1 在Win10平台下使用jetty的部署及配置
Zhizhen new energy rushes to the scientific innovation board: the annual revenue is 220million, and SAIC venture capital is the shareholder
Laravel - model (new model and use model)
R语言ggplot2可视化:使用ggplot2可视化散点图、使用labs参数自定义X轴的轴标签文本(customize X axis labels)
物联网应用技术专业是属于什么类
Anchor navigation demo
Getting started with rce
登录界面代码
别不服气。手机功能升级就是强
Oneconnect listed in Hong Kong: with a market value of HK $6.3 billion, ye Wangchun said that he was honest and trustworthy, and long-term success
Set up a website with a sense of ceremony, and post it to the public 2/2 through the intranet
Guofu hydrogen energy rushes to the scientific and Technological Innovation Board: it plans to raise 2billion yuan, and 360million yuan of accounts receivable exceed the revenue
Liste des liens (simple)
TDengine 社区问题双周精选 | 第三期
R语言ggplot2可视化:可视化折线图、使用theme函数中的legend.position参数自定义图例的位置
昆仑太科冲刺科创板:年营收1.3亿拟募资5亿 电科太极持股40%
-Web direction attack and defense world
蓝桥杯学习2022.7.5(上午)
Judge whether the variable is an array