U E D R , A S I H C RSS

Our Major Lang IsCAndCPlus Plus/Variable

€ˆ˜˜ ˜—ญ

 „—ญ €ˆ˜ - •‹น ŒŒผ ‚—„œ œ šจ•จ (™€ ฐธกฐ ๊ฐ€Šฅ), BSS „ธ๊ทธจผŠธ˜ ๊ณต๊ฐ„ ‚ฌšฉ
€—ญ €ˆ˜ - •‹น ธ”Ÿญ ‚—„œ œ šจ•
static  „—ญ €ˆ˜ - •‹น ŒŒผ ‚—„œ œ šจ•จ (™€ ฐธกฐ ถˆ๊ฐ€Šฅ)

€ˆ˜˜ ๊ธฐ–ต €ฅ˜ € •

€ˆ˜˜ ๊ธฐ–ต žฅ†Œ „ ƒ

register - CPU  ˆ€Šค„ฐฅผ €ˆ˜กœ • ‹น
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);
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:56
Processing time 0.0091 sec