Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PreDir
//g++ 7.4.0 //Preprocessor Directives //this code is created by Rezaul Hoque on November 24,2021;contact: jewelmrh@yahoo.com //note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; #include <iostream> using namespace std; #ifndef size #define size 2 #endif #define s(c) #c #define add(a,b) a##b int main() { int l; for(l=0;l<size; l++) { if(l%2==0) { std::cout<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<"\n"; } else { std::cout<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<"\n"; } } add(c,out)<<"Preprocessor Directives in action:"; std::cout<<"\n"; std::cout<<__DATE__; std::cout<<"\nTime:"<<__TIME__; std::cout<<" \n"; for(l=0;l<size; l++) { if(l%2==0) { std::cout<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<s(<)<<"\n"; } else { std::cout<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<s(>)<<"\n"; } } return 0; }
run
|
edit
|
history
|
help
0
google
Logical AND versus Bitwise AND
typedef
template
12/13 quiz shickes
MemCpySetChar
0-1 Knapsack
pure virtual function with non-fixed number of parameters
c2p
cppPyPoly