How to declare symbolic constant in C?
Symbolic Constant
On this page
Symbolic constant
#include <stdio.h>
#define PI 5.2676
#define MAXSIZE 100
#define MESSAGE "Hello World"
int main() {
float circumference = 2 * PI * 5;
printf("Circumference: %f\n", circumference);
printf("Max size: %d\n", MAXSIZE);
printf("%s\n", MESSAGE);
return 0;
}
Output
Circumference: 52.675999
Max size: 100
Hello World