��������� ������ ¶
������ ������ - ������ ������ ��������� ��������� (������ ������ �����), BSS ���그��������� 공간 ������
������ ������ - ������ ������ ��������� ���������
static ������ ������ - ������ ������ ��������� ��������� (������ ������ ��������)
������ ������ - ������ ������ ��������� ���������
static ������ ������ - ������ ������ ��������� ��������� (������ ������ ��������)
��������� 기��� ������ ������ ¶
��������� 기��� ������ ������
register - CPU ��������������� ��������� ������
auto - ������ 공간��� ��������� ������
static - BSS ���그��������� 공간��� ��������� ������
extern - ������ ������ ������
auto - ������ 공간��� ��������� ������
static - BSS ���그��������� 공간��� ��������� ������
extern - ������ ������ ������
const ��������� ¶
~cpp const int a; int const b; const int *c; int * const d; const int * const e;
volatile ��������� ¶
~cpp #include <stdio.h> #include <time.h> void main() { clock_t start, finish; double duration; start = clock(); volatile int a = 10, b = 20, c; for(int i = 0 ; i < 1000000000 ; i++) c = a * b; finish = clock(); duration = (double)(finish - start) / CLOCKS_PER_SEC; printf("%2.1f seconds\n", duration); }