Solution: Use sprintf() function.
You can also write your own function using ASCII values of numbers.
My Personal Notes arrow_drop_up
- Converting string to number and vice-versa in C++
- Converting Strings to Numbers in C/C++
- C Program to print numbers from 1 to N without using semicolon?
- sprintf() in C
- Commonly Asked C Programming Interview Questions | Set 1
- Implement your own itoa()
- To find sum of two numbers without using any operator
- Program to compute Log n
- Print "Even" or "Odd" without using conditional statement
- How will you show memory representation of C variables?
- Change/add only one character and print '*' exactly 20 times
- Condition To Print "HelloWord"
- Write a C program to print "Geeks for Geeks" without using a semicolon
- Program for Sum the digits of a given number
- How will you print numbers from 1 to 100 without using loop?