Skip to content

Instantly share code, notes, and snippets.

/tmk_custom_macro.c Secret
Created Oct 29, 2014

Embed
What would you like to do?
How can I MACRO( T(N), ...) each (int) element in digits array in reverse order?
#include <stdio.h>
int main(){
int config_n = 1024;
int n = config_n; int c = 0; while (n != 0) { n /= 10; c++; } int digits[c]; c = 0; n = config_n; while (n != 0) { digits[c] = n % 10; n /= 10; c++; }
// How can I MACRO( T(N), ...) each (int) element in digits array in reverse order?
// MACRO( I(0), T(digits[0]), T(digits[1]), T(digits[2]), T(digits[N]), ..., END)
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.