Hi, I am trying to convert integer to string.
this is my code -
but I am getting segmentation fault in sprintf() call.
Any idea why this is coming?
this is my code -
Code:
long num = 23456789;
char buff[20];
sprintf(buff, "%s", num);
printf("%s\n", buff);
Any idea why this is coming?
Comment