Working of the C Preprocessor

前端 未结 7 837
轻奢々
轻奢々 2021-01-19 05:12

How does the following piece of code work, in other words what is the algorithm of the C preprocessor? Does this work on all compilers?

#include 

        
相关标签:
7条回答
  • 2021-01-19 05:52

    #define simply assigns a value to a keyword.

    Here, 'b' is first assigned value 'a' then 'a' is assigned value '170'. For simplicity, it can be expressed as follows:

    b=a=170
    

    It's just a different way of defining the same thing.

    0 讨论(0)
提交回复
热议问题