C语言中有哪些关键字

261次

问题描述:

C语言中有哪些关键字希望能解答下

最佳答案

推荐答案

C 语言中的关键字(Keywords)是一组在 C 语言编程中具有特定意义的单词。

这些关键字不能作为变量名或函数名等标识符使用。以下是 C 语言中一些常见的关键字:

1. auto

2. break

3. case

4. char

5. const

6. continue7. default8. do9. double10. else11. enum1

2. extern1

3. float1

4. for1

5. goto1

6. if17. int18. long19. register20. return21. short2

2. signed2

3. sizeof2

4. static2

5. struct2

6. switch27. typedef28. union29. unsigned30. void31. volatile3

2. while3

3. inline3

4. restrict3

5. bool3

6. complex37. imaginary38. alignas39. alignof40. atomic41. static_assert4

2. noreturn4

3. threadlocal4

4. generic这些关键字在 C 语言中具有特殊的作用,用于定义变量、控制流程、声明函数等。需要注意的是,C 语言的关键字都是小写的英文字母。在编写程序时,应确保不要将它们用作标识符,以避免引起歧义。

为你推荐