47. Comment(註解)
• 增加程式的可讀性、維護性
1. 單行註解
2. 多行註解
/*This is your first program in C*/
//This is your first program in C
/*Hello, everyone!
Welcome to the world of Computer Science!
I hope you will like this course.
*/
50. • 必須由英文字母大寫(A – Z)、小寫
(a – z)、數字(0 – 9)和底線(_)組
成。但第一個字元不可為數字。
變數名稱限制
識別字 是否合法?
this_Is_A_Long_Variable_Name
識別字 是否合法?
TLC_2013
識別字 是否合法?
2013_TLC
識別字 是否合法?
Hello!
識別字 是否合法?
number1
識別字 是否合法?
@
識別字 是否合法?
a
變數名稱 是否合法?
A Yes
No
Yes
No
Yes
No
Yes
Yes
51. • 不能用來取變數名稱的字
保留字(Reserved word )
/ 關鍵字(Keyword)
char short int unsigned long float double struct
union void enum signed const volatile typedef auto
register static extern break case continue default do
else for goto if return switch while sizeof