Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.33 KB

data-types.mdx

File metadata and controls

49 lines (31 loc) · 1.33 KB
title
Basic data types

C/C++ statically typed languages. Before we can store certain values in the computer memory, we need to declare their data types.

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock';

import data_types_c from '!!raw-loader!/src/c/basics/02-data-types.c';

{data_types_c}

import data_types_cpp from '!!raw-loader!/src/cpp/basics/02-data-types.cpp';

{data_types_cpp}

:::info

A decimal integer cannot start with 0, in that case it is considered octal base. For example, 076 denotes 63 in decimal notation.

:::

:::tip Good to know

For numeric data types that span multiple bytes, the order of arrangement of bytes is important. Depending on the processor architecture, there are two formats: big endian and little endian.

Big endian: the most significant bits occupy the lower address. This representation is used in powerpc processor.

Little endian: the least significant bits occupy the lower address. This format is used in all x86 compatible processors.

:::