The data types in
c are divided into two categories: 1. Predefined types, including integers, characters, Boolean types, floating point types, null types, and pointer types; 2. Custom data types, Contains arrays, structures, unions, and enumerations.
#C provides programmers with a rich variety of built-in predefined data types and user-defined data types. Below we will introduce these two types of data to you in detail, which will serve as a reference and we hope it will be helpful to you.
[Video tutorial recommendation: C tutorial]
Data type in c:
1. Predefined types
Integer type
c There are four integer types: short, int, long , long long, each has two categories: signed (signed, default) and unsigned (unsigned). Signed integers can represent both non-negative integers and negative integers; however, unsigned integers cannot represent negative numbers. Can only represent non-negative integers.
In the implementation of c, the number of storage bits (width) used by each type on different systems is different. The rules are:
● Short at least 16 bits
● int is at least as long as short
● long is at least 32 bits, and at least as long as int
● long long is at least 64 bits, and at least as long as long
Character type
Meaning | The minimum number of bits occupied by this type of data | |
---|---|---|
Character | 8 bits (can represent 28 characters) | |
Wide characters | 16 bits | |
Unicode characters | 16 bits | |
Unicode character | 32 bits |
The above is the detailed content of What are the data types in c++. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool