#include <stdio.h> //<stdio.h>庫 包含stdio.h 這個庫
int main(void) //函數(shù)mian int指明了main()函數(shù)的返回類型衣撬,返回給操作系統(tǒng)琐簇。若函數(shù)不接受任何參數(shù)崇堰,一定要指明參數(shù)為void
{
int dogs; //int 數(shù)據(jù)類型 dogs 變量
printf("How many dogs do you have?\n"); //輸出
scanf("%d", &dogs); //輸入 %d 格式占位符,指示輸出dogs值的位置和形勢 &取地址符
printf("So you have %d dog(s)!\n", dogs); //輸出
printf("dogs的指針是:%p \n", &dogs);
return 0;//返回值
}
常量
變量
運算符
表達(dá)式
控制語句
輸入和輸出
函數(shù)
數(shù)組和指針
flizny
和flizny[0]
都代表首元素的內(nèi)存地址
//數(shù)組名是該數(shù)組首元素的地址
flizny = &flizny[0]
字符串
結(jié)構(gòu)
庫