函数宏定义

C语言函数宏定义

使用宏定义调用函数

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#include<stdio.h>
#include<string.h>
#define Count(n) strlen(n)

int main()
{
	char str[100] = { "China" };
	printf("The Length of string is %d!\n", Count(str));
	
	return 0;
}
updatedupdated2020-05-032020-05-03