C Program For Long to String ConversionLlaxmigangarajula03proficient84 published articlesReadDiscussCoursesPracticeImprove Article ImproveSave Article SaveLike Article LikeTo convert the long to string in C language we will use the following 2 approaches:Using Macros with sprintfUsing sprintfInput: long = 1234 Output: string 12341. Using Macros and sprintfC// C Program for Long to // String Conversion#include <stdio.h>#include <string.h> #define Max_Digits 10int main(){ long N = 1243; char str[Max_Digits + sizeof(char)]; sprintf(str, "%ld", N); printf("string is: %s \n", str);}Outputstring is: 1243 2. Using Sprintf C// C Program for Long to String Conversion#include <stdio.h> int main(){ long x = 1234; char str[256]; sprintf(str, "%ld", x); printf("The string is : %s", str); return 0;}OutputThe string is : 1234Last Updated : 03 Aug, 2022Like Article Save Article Please Login to comment...