Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara The Basic Concept of the Memory | Data Types and Arrays
C++ Intermediate | Mobile-Friendly
course content

Contenuti del Corso

C++ Intermediate | Mobile-Friendly

C++ Intermediate | Mobile-Friendly

1. Data Types and Arrays
2. References & Pointers
3. Dynamic Memory
4. Functions

book
The Basic Concept of the Memory

Let’s get to know the basic memory concept in C++.

Information in your computer is stored as bits and bytes. They work like storage for the data. The bit is the smallest unit of storage, which can be only 0 or 1. Bits are not so informative in usage, so they group in bytes! One byte consists of a collection of 8 bits. Bytes are used to transmit and contain different amounts of information, and the other data types have their byte size, which defines how big they can be.

Int is used for storing whole numbers. It usually requires 4 bytes. Accept values between -2,147,483,648 to 2,147,483,647.

For storing decimal numbers. Double typically requires 8 bytes of memory space.

Stores individual characters. Char usually needs 1 byte and ranges from -128 to 127.

The string type is used to store text (collection of characters). String typically requires 24 bytes of memory space.

Boolean can only store the values true and false. Its size is only 1 byte.

question mark

int usually needs 4 bytes. How many bits is that?

Select the correct answer

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 1

Chieda ad AI

expand
ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

course content

Contenuti del Corso

C++ Intermediate | Mobile-Friendly

C++ Intermediate | Mobile-Friendly

1. Data Types and Arrays
2. References & Pointers
3. Dynamic Memory
4. Functions

book
The Basic Concept of the Memory

Let’s get to know the basic memory concept in C++.

Information in your computer is stored as bits and bytes. They work like storage for the data. The bit is the smallest unit of storage, which can be only 0 or 1. Bits are not so informative in usage, so they group in bytes! One byte consists of a collection of 8 bits. Bytes are used to transmit and contain different amounts of information, and the other data types have their byte size, which defines how big they can be.

Int is used for storing whole numbers. It usually requires 4 bytes. Accept values between -2,147,483,648 to 2,147,483,647.

For storing decimal numbers. Double typically requires 8 bytes of memory space.

Stores individual characters. Char usually needs 1 byte and ranges from -128 to 127.

The string type is used to store text (collection of characters). String typically requires 24 bytes of memory space.

Boolean can only store the values true and false. Its size is only 1 byte.

question mark

int usually needs 4 bytes. How many bits is that?

Select the correct answer

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 1
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt