cpp macro
#define PRINT(x) std::cout << x << std::endl
c macros
/*
Every time the program encounters circleArea(argument),
it is replaced by (3.1415*(argument)*(argument)).
*/
#define circleArea(r) (3.1415*(r)*(r))
macros in c
A macro is defined at the top of your program.
for eg: #define PI 3.14
Now whenever you write PI in your program 'PI' is replaced by 3.14
Actually this replacement is done by the preprocessor before the source code is compiled.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us