int sprintf(char *str, const char *string,...);
sprintf stands for “String print”. Instead of printing on console, it store output on char buffer which are specified in sprintf
Sum of 10 and 20 is 30
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- What is the difference between printf, sprintf and fprintf?
- Smallest string obtained by removing all occurrences of 01 and 11 from Binary String
- Check if a string can be obtained by appending subsequences of another string
- Pair of strings having longest common prefix of maximum length in given array
- Minimum adjacent swaps swaps to group similar characters together
- Minimum substring flips required to convert given binary string to another
- Hamming code Implementation in C/C++
- Minimum length of Run Length Encoding possible by removing at most K characters from a given string
- Program to construct DFA accepting odd number of 0s and odd number of 1s
- Check if given email address is valid or not in C++
- Queries to count frequencies of a given character in a given range of indices
- Reverse substrings of given string according to specified array indices
- Check if permutation of a given string can be made palindromic by removing at most K characters
- Print all positions of a given string having count of smaller characters equal on both sides