I\'m so confused with sprintf that a funny problem with different platfrom. Code :
int main ()
{
char sql[1024];
uint32_t app_id = 32;
uint64_t
As has been pointed out, the proper formatting specifier for uint64_t is PRIu64 (not lu, since there's no guarantee that uint64_t is long).
So, you need to use that:
#define __STDC_FORMAT_MACROS
#include
char sql[1024];
uint32_t app_id = 32;
uint64_t task_id = 64;
sprintf(sql, "%u, %" PRIu64, app_id, task_id);
printf ("%s\n", sql);