what is the diff between the printf and sprintf functions??
and what is the syntax for this two functions ??
Answer Posted / vignesh1988i
the printf and sprintf functions are used to output to the
screen.....
in printf... just we can print the necessary things as
we wanted
SYNTX is:: printf("format specifiers..(%d or %c
etc)",list of agruments..(arg1,arg2... arg n);
hrewr this function directly output whatever you are giving
inside ....
but sprintf is called Stream printf... where it will store
whatever we output to the screen in an array (ie..stream)
and then output to the screen;;;
sprintf(array base address,"format specifications",variables);
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is the acronym for ansi?
Why we use int main and void main?
What is a method in c?
Why is c called a structured programming language?
What is strcmp in c?
How can I handle floating-point exceptions gracefully?
How do I copy files?
What is meant by type casting?
What are the different types of control structures?
Explain how does free() know explain how much memory to release?
How can I manipulate strings of multibyte characters?
What is declaration and definition in c?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What is a volatile keyword in c?
What is a static function in c?