what is the diff between the printf and sprintf functions??
and what is the syntax for this two functions ??
Answer Posted / jack
The printf subroutine converts, formats, and writes the
Value parameter values, under control of the Format
parameter, to the standard output stream.
The sprintf subroutine converts, formats, and stores the
Value parameter values, under control of the Format
parameter, into consecutive bytes, starting at the address
specified by the String parameter. The sprintf subroutine
places a null character (\0) at the end. You must ensure
that enough storage space is available to contain the
formatted string.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain Function Pointer?
Can a variable be both constant and volatile?
What is a void pointer in c?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
What is a substring in c?
How to get string length of given string in c?
What is the difference between array_name and &array_name?
What is the general form of function in c?
Which function in C can be used to append a string to another string?
What is sizeof int in c?
Is anything faster than c?
Explain built-in function?
What is the use of a static variable in c?
Explain what are run-time errors?
Explain the difference between malloc() and calloc() function?