I did read that but not sure if I'm understanding correctly, would this code be correct?
// Example program to demonstrate sprintf()
#include<stdio.h>
int main()
{
char buffer[50];
int a = now.day, b = now.month, c= now.year;
sprintf(buffer, "%d , %d , %d", a, b, c);
// The string "Day, Month, Year" is stored
// into buffer instead of printing on stdout
printf("%s", buffer);
return 0;
}
[code\]