Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Sizeof Practice | Data
C Basics

book
Sizeof Practice

Determining the Byte Size of the int Data Type

c

main

copy
#include <stdio.h>

int main()
{
printf("Size of int type: %d bytes\n", sizeof(int));
return 0;
}
12345678
#include <stdio.h> int main() { printf("Size of int type: %d bytes\n", sizeof(int)); return 0; }
Oppgave

Swipe to start coding

To find out how many bytes the short data type occupies, you can employ the sizeof() function.

Løsning

#include <stdio.h>

int main()
{
printf("Size of short type is %d bytes\n", sizeof(short));

return 0;
}

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 2. Kapittel 9
#include <stdio.h>

int main()
{
printf("Size of short type is %d bytes\n", ___(___));

return 0;
}

Spør AI

expand
ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

some-alt