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
How are Structure passing and returning implemented by the complier?
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
Explain union. What are its advantages?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
Explain how can I right-justify a string?
What is the easiest sorting method to use?
What is line in c preprocessor?
Explain about the functions strcat() and strcmp()?
How variables are declared in c?
How can you tell whether two strings are the same?
How do you search data in a data file using random access method?
What is difference between && and & in c?
What are the three constants used in c?
How main function is called in c?
What is else if ladder?