Always Be Wise

Keywords와 Identifiers 본문

프로그래밍 언어/C

Keywords와 Identifiers

bewisesh91 2021. 12. 6. 10:11
728x90

C 언어에서 이미 Keyword로 사용하고 있어서 Identifier(ariables, functions, structures 등)로 사용할 수 없는 것들이 있다.

 

▶ 참고 링크

Rules for naming identifiers

  1. A valid identifier can have letters (both uppercase and lowercase letters), digits and underscores.
  2. The first letter of an identifier should be either a letter or an underscore.
  3. You cannot use keywords like int, while etc. as identifiers.
  4. There is no rule on how long an identifier can be.
    However, you may run into problems in some compilers if the identifier is longer than 31 characters.

You can choose any name as an identifier if you follow the above rule, however, give meaningful names to identifiers that make sense. 

'프로그래밍 언어 > C' 카테고리의 다른 글

메모리 구조와 동적 메모리 할당  (0) 2021.12.04
구조체 포인터  (0) 2021.12.04
구조체 배열  (0) 2021.12.04
typedef를 이용한 구조체 선언  (0) 2021.12.04
구조체란?  (0) 2021.12.04
Comments