Sunday 11 January 2009

What is use of # and ## operator in c programming language?


What is use of # and ## operator in c programming language?



There are two operators in preprocessor in c:



1. # 



This operator is called
stringizing operator which convert any argument in the macro function in the
string. So we can say pound sign # is string maker. For example:



#include

#define string(s) #s



int main(){

char str[15]=string(World is
our );

printf("%s",str

No comments:

Post a Comment