C Program For Long To String Conversion - Geeksforgeeks
C Program For Long To String Conversion - Geeksforgeeks
Arrays in C/C++
Complete Interview
std::sort() in C++ STL
Preparation- Self
Multidimensional Arrays in C
/ C++
To convert the long to string in C language we will use the following 2
approaches:
Converting Strings to
Numbers in C/C++
1. Using Macros with sprintf
2. Using sprintf
Left Shift and Right Shift
Operators in C/C++ Input:
Data Types in C
Structures in C Output
Functions in C++
C
int main()
{
long x = 1234;
char str[256];
sprintf(str, "%ld", x);
printf("The string is : %s", str);
return 0;
}
Output
Like 0
Previous Next
01 05
C Program For Double to String Converting String to Long in C
Conversion 15, Jul 22
25, Jul 22
06
02 Conversion of Struct data type to
C Program For Boolean to String Hex String and vice versa
Conversion 15, Sep 16
25, Jul 22
07
03 C Program for Decimal to Binary
C++ Program For Boolean to String Conversion
Conversion 05, Jul 17
01, Jul 22
08
04 Program for conversion of 32 Bits
Write your own strlen() for a long Single Precision IEEE 754 Floating
string padded with '\0's Point Representation
24, May 15 31, Jan 19
Article Contributed By :
laxmigangarajula03
@laxmigangarajula03