当前位置:网站首页>02.1.2. logic type bool
02.1.2. logic type bool
2022-07-28 10:51:00 【vv1025】
//02.1.2. Logical type bool
//c Logical truth and falsehood of language 0 He Fei 0 To express . and C++ There are specific types in , But its essence , Is still
// One char Variables of type can be 0 He Fei 0 Data assignment of .
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
bool flag = true;
if(flag)
printf("flag is true\n");
else
printf("flag is flase\n");
printf("sizeof(flag) = %d sizeof(bool) = %d\n", sizeof(flag), sizeof(bool));
flag = 100;
printf("flag = %d\n", flag);
return 0;
}flag is true
sizeof(flag) = 1 sizeof(bool) = 1
flag = 1
-----------------------------------------------
Process returned: 0 (0x0)
Execution time: 371 ms
Maximum memory use: 276 KB
-----------------------------------------------
Press any key to continue . . .边栏推荐
猜你喜欢

SDUT Round 9 2020 Spring Festival campaign

Attention 注意力机制流程框图

Solving the optimal solution of particle swarm optimization

Blue Bridge Cup embedded Hal library USART_ TX

Yan reports an error: exception message: /bin/bash: line 0: fg: no job control

10_ue4进阶_添加倒地和施法动作

Aike AI frontier promotion (7.28)

GKCylindersNoiseSource

Redis-day01-常识补充及redis介绍

GKNoiseMap
随机推荐
Solving the optimal solution of particle swarm optimization
GKNoiseMap
Using k-means clustering to classify tariff models of different industries
PyQt5快速开发与实战 4.13 菜单栏、工具栏与状态栏 and 4.14 QPrinter
samba学习
粒子群解决tsp的技术问题
AP AUTOSAR platform design 3 architecture
nodejs:搭建express 服务,设置session以及实现退出操作
Install MySQL based on docker
Characteristics and installation of non relational database mongodb
GKPolygonObstacle
Apb2 and apb1 in stm32
11_ue4进阶_男性角色换成女性角色,并修改动画
20200229 training match L1 - 2 delete the substring in the string (20 points)
GKPolygonObstacle
从零开始Blazor Server(2)--整合数据库
Batch Normlization
20200229 training race L2 - 2 tree species Statistics (25 points)
nodejs:mongodb 插入成功之后的返回值
GKObstacle