Created
October 13, 2019 14:57
-
-
Save aishaon/ccd55c80adc67d4b23fb8c36052163ed to your computer and use it in GitHub Desktop.
Constant by "const" keyword
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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