Is there a ‘#’ operator in C ?
If yes then in the code
enum {ALPS, ANDES, HIMALYAS};
what would the following return ?
#ALPS
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The C language does not have an
#operator, but the pre-processor (the program that handles#includeand#define) does. The pre-processor simple makes#ALPSinto the string"ALPS".However, this “stringify” operator can only be used in the
#definepre-processor directive. For example:The pre-processor will convert the above example into the following: