notes

Personal notes
git clone git://git.laack.co/notes.git
Log | Files | Refs

SymbolicConstants.md (415B)


      1 # Symbolic Constants
      2 
      3 **Source:** C Programming Book 
      4 
      5 **Chapter:** 1.4
      6 
      7 **Definition:** Symbolic constants in C are named strings of characters where each occurence of the name, not in quotes or part of another name, is replaced by the string of characters by the preprocessor prior to being sent to the compiler.
      8 
      9 ## Example
     10 
     11 ```c
     12 #include <stdio.h>
     13 #define PI 3.14
     14 
     15 int main(){
     16     printf("%3.2f\n", PI);
     17 }
     18 
     19 ```