Solution: Use sprintf() function.
You can also write your own function using ASCII values of numbers.
- Convert a floating point number to string in C
- gcvt() | Convert float value to string in C
- How to convert C style strings to std::string and vice versa?
- Converting string to number and vice-versa in C++
- C program to count number of vowels and consonants in a String
- Print all possible combinations of the string by replacing '$' with any other digit from the string
- Print substring of a given string without using any string function and loop in C
- How to find length of a string without string.h and loop in C?
- Program to Convert Hexadecimal to Octal
- Convert C/C++ program to Preprocessor code
- Convert C/C++ code to assembly language
- C | String | Question 12
- C | String | Question 4
- C | String | Question 5
- C | String | Question 6