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
What are the 5 data types?
What does a function declared as pascal do differently?
Why should I prototype a function?
How would you rename a function in C?
What are the types of operators in c?
When should structures be passed by values or by references?
What library is sizeof in c?
What is difference between far and near pointers?
When is a “switch” statement preferable over an “if” statement?
What is sizeof array?
What is abstract data structure in c?
Is c is a high level language?
What are the modifiers available in c programming language?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?