C++ examples for Preprocessor:Macro
What is the output from the following program, using #define to create constants and macro
#include <iostream> using namespace std; #define AMT1 a+a+a/* w w w .j a v a 2 s . c o m*/ #define AMT2 AMT1 - AMT1 int main() { int a=1; cout << "Amount is " << AMT2 << "\n"; return 0; }