c language: constants and variables

#define SOMETHING 100

const int SOMETHING 100

  After the code, SOMETHING 100 is replaced with

  Difference between the two: 1.const determine the type of data, the processing is done at runtime

       2. # define program at compile time, all will be replaced by a constant SOMETHING

Guess you like

Origin www.cnblogs.com/uestc2017zh/p/12404474.html