当前位置:网站首页>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
边栏推荐
- 04_solr7.3之solrJ7.3的使用
- Mingfeng medical sprint technology innovation board: annual revenue of 350million yuan, proposed to raise 624million yuan
- 我为什么支持 BAT 拆掉「AI 研究院」
- 展现强大。这样手机就不会难前进
- Etcd database source code analysis -- rawnode simple package
- Interpretation of tiflash source code (IV) | design and implementation analysis of tiflash DDL module
- 基于伯努利原理的速度监测芯片可用于天然气管道泄露检测
- Linked list (simple)
- Detailed explanation of IP address and preparation of DOS basic commands and batch processing
- 汇编语言 assembly language
猜你喜欢

TiCDC 6.0原理之Sorter演进

The IPO of Ruineng industry was terminated: the annual revenue was 447million and it was planned to raise 376million

Getting started with rce

基于 TiDB 场景式技术架构过程 - 理论篇

::ffff:192.168.31.101 是一个什么地址?

Anchor navigation demo

Recommendation number | what are interesting people looking at?

IP packet header analysis and static routing

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

牛客网:拦截导弹
随机推荐
牛客网:拦截导弹
[cloud resources] what software is good for cloud resource security management? Why?
深拷贝真难
享你所想。智创未来
Tidb DM alarm DM_ sync_ process_ exists_ with_ Error troubleshooting
金融壹賬通香港上市:市值63億港元 葉望春稱守正篤實,久久為功
-Web direction attack and defense world
matlab学习2022.7.4
uplad_ Labs first three levels
Ueditor + PHP enables Alibaba cloud OSS upload
基于微信小程序的订餐系统
laravel-dompdf导出pdf,中文乱码问题解决
PHP basic syntax
Scenario based technology architecture process based on tidb - Theory
Elfk deployment
Convolutional Neural Networks简述
Attack and defense world crypto WP
Liste des liens (simple)
Attack and defense world web WP
神经网络物联网未来现状和趋势及看法