/* C program to demonstrate example of Stringizing Operator */ #include <stdio.h> #define getVariableName(x) #x int main() { int student_age = 21; printf("value of %s is = %d\n", getVariableName(student_age), student_age); return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter