Learning about macros in C | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Learning about macros in C

I don't think macros are covered in the C tutorials. Anybody have a good recommendation for where to learn about them? Thanks!

10th Apr 2019, 6:41 AM
Heather
Heather - avatar
3 Answers
10th Apr 2019, 6:59 AM
Anna
Anna - avatar
0
Thanks. That's helpful. I thought macro was a keyword. I've looked at examples of macros now. But what exactly is a macro? Also, can somebody please explain this code from the challenges. #define macro(r,a,b)b##a##r #define CHAOS macro(r,a,b) void CHAOS(){ printf("order"); } int main(){ bar(); return 0; }
10th Apr 2019, 4:56 PM
Heather
Heather - avatar
0
Anna , how do you get to the lessons? When I click on the link lessons from the app it shows all the quiz pages too. I like your link better; it's easier to scroll through the lesson.
10th Apr 2019, 4:58 PM
Heather
Heather - avatar