C Programming - C Preprocessor - Discussion
Discussion Forum : C Preprocessor - Find Output of Program (Q.No. 4)
4.
What will be the output of the program?
#include<stdio.h>
#define JOIN(s1, s2) printf("%s=%s %s=%s \n", #s1, s1, #s2, s2);
int main()
{
char *str1="India";
char *str2="BIX";
JOIN(str1, str2);
return 0;
}
Discussion:
35 comments Page 4 of 4.
Vijendra said:
1 decade ago
What will be the answer the S1, S2?
Poovarasan said:
6 years ago
Not getting it. Please explain me.
(1)
Nimisha said:
1 decade ago
#s is used to print string value.
Nikhil said:
1 decade ago
## concatenates not a single #
Krishz said:
1 decade ago
Ya you are right vasuuma:-).
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers