Tuesday 13 November 2012

Token pasting operator in c language with program source code.



/* use of token pasting operator with Output */
//Token pasting operator is used to concatenate two tokens into a single token.
with program source code.


#define PASTE(a,b) a##b
#define MARKS(sub) marks_##sub
int main()
{
int k1=15,k2=60;
int marks_os= 95;
int marks_ds=99;

//converting statement below to printf("%d %d",k1,k2)

printf("%d %d ",PASTE(k,1),PASTE(k,2));

//converting statement below to printf("%d %d",marks_os,marks_ds)
printf("%d %d ",MARKS(os),MARKS(ds));
}
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: