Code:
sprintf(joined_string,"'%s','%s','%s'",str1,str2,str3);