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 are the 3 types of structures?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
How can I write functions that take a variable number of arguments?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
Describe the order of precedence with regards to operators in C.
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
What is meant by operator precedence?
What does return 1 means in c?
Process by which one bit pattern in to another by bit wise operation is?
What is FIFO?
How do we make a global variable accessible across files? Explain the extern keyword?
How do you define a function?
formula to convert 2500mmh2o into m3/hr
How can I generate floating-point random numbers?