C언어 - 키워드와 예약어

2020. 11. 6. 17:19개인공부/C언어

en.cppreference.com/w/c/keyword

 

C keywords - cppreference.com

This is a list of reserved keywords in C. Since they are used by the language, these keywords are not available for re-definition. The most common keywords that begin with an underscore are generally used through their convenience macros: Also, each name t

en.cppreference.com

C keywords

 

Keywords

 

This is a list of reserved keywords in C. Since they are used by the language, these keywords are not available for re-definition.

auto
break
case
char
const
continue
default
do
double
else
enum
extern

float
for
goto
if
inline (since C99)
int
long
register
restrict (since C99)
return
short

signed
sizeof
static
struct
switch
typedef
union
unsigned
void
volatile
while

_Alignas (since C11)
_Alignof (since C11)
_Atomic (since C11)
_Bool (since C99)
_Complex (since C99)
_Generic (since C11)
_Imaginary (since C99)
_Noreturn (since C11)
_Static_assert (since C11)
_Thread_local (since C11)

 

 

 

 

 

 

 

 

 

The most common keywords that begin with an underscore are generally used through their convenience macros:

keyword used as defined in
_Alignas (since C11) alignas stdalign.h
_Alignof (since C11) alignof stdalign.h
_Atomic (since C11) atomic_bool, atomic_int, ... stdatomic.h
_Bool (since C99) bool stdbool.h
_Complex (since C99) complex complex.h
_Generic (since C11) (no macro)
_Imaginary (since C99) imaginary complex.h
_Noreturn (since C11) noreturn stdnoreturn.h
_Static_assert (since C11) static_assert assert.h
_Thread_local (since C11) thread_local threads.h

header를 include할때부터 사용할수 없다.

 

 

 

pinrtf를 변수선언 해버릴 경우 컴파일때 함수로 인식하지 않고 변수로 인식해서 에러가 난다.

 

 

 

 

 

if
elif
else
endif
defined

ifdef
ifndef
define
undef

include
line
error
pragma

전처리기에서 쓰는 것들

 

_Pragma(since C99)

 

'개인공부 > C언어' 카테고리의 다른 글

C언어 - 데이톼와 자료형  (0) 2020.11.09
C언어 - 함수 만들기  (0) 2020.11.06
C언어 - 변수, 자료형  (0) 2020.11.06
C언어 - 함수  (0) 2020.11.06
C언어 - 컴퓨터에 대한 이해  (0) 2020.11.06