Skip to content

Instantly share code, notes, and snippets.

@aishaon
Created October 13, 2019 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aishaon/93d7a9d230d0178bfec3a5e423a3df0f to your computer and use it in GitHub Desktop.
Save aishaon/93d7a9d230d0178bfec3a5e423a3df0f to your computer and use it in GitHub Desktop.
Constant in C language
#include <stdio.h>
// by #define preprocessor
#define LENGTH 15
#define WIDTH 7
#define NEWLINE '\n'
int main() {
int area;
area = LENGTH * WIDTH;
printf("value of area : %d", area);
printf("%c", NEWLINE);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment