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.0118 sec