Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Datatypes Modifiers | Data Types and Arrays
C++ Intermediate | Mobile-Friendly

bookDatatypes Modifiers

There are also name implies - datatype modifiers. They can modify the length of data that a particular data type can hold.

  • signed - to take negative and positive values.
  • unsigned - to take only positive diapason of values.
  • short - to short the diapason and memory needed for your program.
  • long - to lengthen the diapason and memory required for your program.
short int a;    // size: 2 bytes   range: -32 768 to 32 767

long int b;   // size: 4 bytes  range: -2 147 483 648 to 2 147 483 647

signed char c;   // size: 1 byte   range: -128 to 127
unsigned char d; // size: 1 byte   range: 0 to 255
question mark

We can also combine the power of two datatypes modifiers by declaring the values (it takes the features from 2 modifiers simultaneously). In your opinion, which size and sign will have the datatype unsigned short int?

Select the correct answer

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 2

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

Suggested prompts:

Stel mij vragen over dit onderwerp

Vat dit hoofdstuk samen

Toon voorbeelden uit de praktijk

Awesome!

Completion rate improved to 2.94

bookDatatypes Modifiers

Veeg om het menu te tonen

There are also name implies - datatype modifiers. They can modify the length of data that a particular data type can hold.

  • signed - to take negative and positive values.
  • unsigned - to take only positive diapason of values.
  • short - to short the diapason and memory needed for your program.
  • long - to lengthen the diapason and memory required for your program.
short int a;    // size: 2 bytes   range: -32 768 to 32 767

long int b;   // size: 4 bytes  range: -2 147 483 648 to 2 147 483 647

signed char c;   // size: 1 byte   range: -128 to 127
unsigned char d; // size: 1 byte   range: 0 to 255
question mark

We can also combine the power of two datatypes modifiers by declaring the values (it takes the features from 2 modifiers simultaneously). In your opinion, which size and sign will have the datatype unsigned short int?

Select the correct answer

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 2
some-alt