简易C语言——宏定义(1)
#include <stdio.h>
#define YEAR 2018
int main(void)
{
int year;
year = YEAR;
printf(" Year = %d \n",year);
return 0;
}
Tip:
1、#define YEAR 2018 宏定义了了YEAR代表2018,这样可以提高代码的可维护性和可读性。
#include <stdio.h>
#define YEAR 2018
int main(void)
{
int year;
year = YEAR;
printf(" Year = %d \n",year);
return 0;
}
Tip: