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/ccd55c80adc67d4b23fb8c36052163ed to your computer and use it in GitHub Desktop.
Save aishaon/ccd55c80adc67d4b23fb8c36052163ed to your computer and use it in GitHub Desktop.
Constant by "const" keyword
#include <stdio.h>
// by "const" keyword
int main() {
const int LENGTH = 15;
const int WIDTH = 7;
const char NEWLINE = '\n';
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